[unixODBC-support] unixODBC and freeTDS column-wise parameter binding
nick.gorham at easysoft.com
Tue Jun 14 09:32:31 BST 2005
Alexander Zlotnikov (azlotnlk) wrote:
> Thank you for quick response.
> It does seem to point to the driver rather then DM. The reason I have
> suspected DM is because two different drivers ( freeTDS and
> DataDirect) behave the same way with unixODBC. My code works as
> expected if I use DataDirect driver manager and DataDirect ms-sql
> driver. I could not get freeTDS to work with DataDirect DM.
> Martin, I use a separate array for each parameter and specify
> SQL_ATTR_PARAM_BIND_TYPE as SQL_PARAMETER_BIND_BY_COLUMN
> Thank you,
Out of interest, can you send a log of what happens with DataDirect and
unixODBC I am interested to see what the difference could be. I don't
know (but others may) if the freeTDS driver supports arrays of parameters.
How are you setting the size of the parameter array. via the statement
attr SQL_ATTR_PARAMSET_SIZE, or the descriptor header value
SQL_DESC_ARRAY_SIZE in the APD?
What platform is it on BTW.
If the unixODBC DM detects a ODBC 2 driver, it will map a
SQL_ATTR_ROW_ARRAY_SIZE SQLSetStmtAttr to a SQL_ROWSET_SIZE but it
doesn't go near SQL_ATTR_PARAMSET_SIZE.
> Date: Sat, 11 Jun 2005 00:42:18 +0100
> From: Nick Gorham <nick.gorham at easysoft.com
> <mailto:nick.gorham at easysoft.com>>
> Subject: Re: [unixODBC-support] unixODBC and freeTDS column-wise
> parameter binding
> To: Support for the unixODBC project <unixodbc-support at easysoft.com
> <mailto:unixodbc-support at easysoft.com>>
> Message-ID: <42AA255A.7070006 at easysoft.com
> <mailto:42AA255A.7070006 at easysoft.com>>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Martin J. Evans wrote:
>> I can confirm that array bound parameters work fine in unixODBC with a
>> number of drivers I have. You say "column-wide" and then "parameters"
>> and I can also confirm array bound columns bound to a result-set work
>> fine in unixODBC with various drivers I have here. I'd suggest you
>> would be better directing this to the FreeTDS list.
>> Alex Zlotnikov wrote:
>>> Column-wide parameter binding does not seems to work with
>>> unixODBC/freeTDS. Only first set of parameters values are being
>>> passed to ms-sql server. The same code works as expected with
>>> DataDirect driver and driver manager. But if unixODBC used with
>>> DataDirect driver, I see the same behavior where only first values
> are passed.
>>> Thank you,
> In actual fact the DM has very little to do with this, the pointer is
> passed from the app to the driver without change by the driver manager.
>unixODBC-support mailing list
>unixODBC-support at easysoft.com
More information about the unixODBC-support