Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using LOBs with Sybase ODBC driver fails SQLPutData / SQL_DATA_AT_EXEC

35 views
Skip to first unread message

sebflaesch

unread,
Jul 19, 2010, 11:15:51 AM7/19/10
to
Hi all,

Sybase ASE 15.5 Developer Edition, Linux 32b.

I am trying to insert LOBs into columns with text / image data types,
using SQLBindParameter() with the indicator parameter set to
SQL_DATA_AT_EXEC, to have SQLExecute() return SQL_NEED_DATA and then
provide the LOB data with SQLParamData() / SQLPutData() calls.

I am 100% sure about the code, because I am using the same code with
different ODBC clients (EasySoft, SQL Server Native Client, DB2 CLI),
so this should be working without problem.

But when calling SQLPutData(), I get SQL_ERROR, and when I try to get
diagnostic information, I get not record.

Looks like LOBs are not supported by the Sybase ODBC driver...

Thanks for reading.
Seb

sebflaesch

unread,
Jul 22, 2010, 5:11:20 AM7/22/10
to
It appears that with SYBASE ASE the fifth parameter of
SQLBindParameter(), must be SQL_LONGVARCHAR for text columns and
SQL_LONGVARBINARY for image columns.

With the EasySoft driver (for SQL Server), you can pass SQL_VARCHAR an
SQL_VARBINARY.

With DB2 CLI you have to pass SQL_CLOB and SQL_BLOB ...

Must be something related to "ODBC compliance", not sure I really get
that concept ;-)

Fortunately I have specific code for every database type.

Seb

0 new messages