Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

SQLsetConnectattr failure on HP-UX with Merant Odbc driver

sugan
Occasional Visitor

SQLsetConnectattr failure on HP-UX with Merant Odbc driver

Hi all,
I'm facing a problem while calling the sqlsetconnectattr through the application. I'm using MERANT ODBC driver and the problem occurs only in HP-UX.It works fine on SUN Solaris platform.

In the application some queries are executed asynchronously i.e. the calling program forks off a process to execute a set of queries. To execute the query asynchronously a call to the ODBC function SQLSetConnectAttr is made to set the Connection attributes.This function returns
-1. The call to this odbc function is made as follows

MCX_ODBC_CALL(pAccess,SQLSetConnectAttr)(pAccess->hdbc,
pdrvr->podbc_opts->sql_async_enable,
(pAccess->flags & DAF_ASYNC) ? SQL_ASYNC_ENABLE_ON: SQL_ASYNC_ENABLE_OFF);


#define MCX_ODBC_CALL(paccess, odbc_arg) (*(paccess->pDrvr->podbc_funcs->f ## odbc_arg))

the attribute is sql_async_enable which is #defined to 4
the value for this attribute can be 0 or 1.
Since the value is an intgter the string length field is ignored

The ODBC function SQLSetConnectAttr is defined in podbc_funcs

MCX_ODBC_CALL is a macro written by us and the same call works fine in SunOS.

Can anyone help me in this regard

regards
sugan


sugan