Skip to Content.
Sympa Menu

freetds - Re: [freetds] A more proper workaround for this Perl DBD::ODBC workaround ....

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Chad Johnson <chadjamesjohnson AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] A more proper workaround for this Perl DBD::ODBC workaround ....
  • Date: Thu, 19 Mar 2009 00:14:48 -0500

On Tue, Mar 17, 2009 at 7:59 PM, Chad Johnson
<chadjamesjohnson AT gmail.com> wrote:
> I think you got the gist of it!  To summarize:  Queries are getting
> re-prepared between executes when the size of the bound strings
> increases.  To work around this the DBD::ODBC authors set a minimum
> size of 80 on bound varchar data.  Additional logic exists in
> DBD::ODBC to keep track of the minimum size in between executes.
>
> From your previous comment it sounds like a better solution would be
> to call SQLSetStmtAttr() instead.  I'll give that a shot.  Thanks!
>
> -Chad J
>

I perused the ODBC docs at :

http://msdn.microsoft.com/en-us/library/ms712631(VS.85).aspx

And the correct `Attribute` to pass into SQLSetStmtAttr is not jumping
out at me to increase the size of the buffer for one parameter. I
make no claims to being an ODBC guru, but, from what I can discern
these `Attributes` effect the entire statement (as the name of the
function would imply) as opposed to just one parameter on the
statement. Am I missing something obvious?

Thanks!
Chad J




Archive powered by MHonArc 2.6.24.

Top of Page