SQLNumParams not called

SQLNumParams not called

Post by foxy.m » Fri, 15 May 2009 21:48:36


Hi,
I'm developing an ODBC driver and have problems with using it under
VB.
Code in VB looks like this:
cnJB.ConnectionString = "DSN=jbase4"
cnJB.Open
cmdJB.ActiveConnection = cnJB
cmdJB.CommandText = "SPTEST"
cmdJB.CommandType = adCmdStoredProc
cmdJB.Parameters.Refresh
cmdJB.Execute

On Parameters.Refresh line I'm getting error (80040e51).
I have turned ODBC trace ON and tried to use DB2 ODBC driver to
compare logs.
For DB2 driver function SQLNumParams function is called after
SQLPrepareW, for my driver SQLFreeStmt is called instead of
SQLNumParams. What can cause such a behavior ?

Regards.
 
 
 

SQLNumParams not called

Post by UGFrLU1pbm » Fri, 22 May 2009 13:26:01

It is difficult to tell since I don't have access to your driver prototype.

But since ADO is using MSDASQL to connect to an ODBC driver, you may want to
make sure your driver works well with OleDB first. To do so, you can try to
run the OleDB conformance test, which can be downloaded from:
http://www.yqcomputer.com/ %2fkGNybWXuzC5zVWDBf28dXhf0vDkEDkugMZUJvB7w%3d%3d

You can then compare the result between your driver prototype, IBM DB2 ODBC
driver, and SQL Server Native Client 10.0.

Thanks,
Ming.
WDAC Team, Microsoft.

P.S. We recommend customers to use the forum to ask questions in the future,
where you can obtain a faster response (Forum is at:
http://www.yqcomputer.com/ )

 
 
 

SQLNumParams not called

Post by foxy.m » Sun, 24 May 2009 00:19:50

Thanks a LOT !
I'll try to run the OleDB conformance test.
 
 
 

SQLNumParams not called

Post by foxy.m » Wed, 03 Jun 2009 20:14:56

Problem solved. I forgot to include SQL_API_SQLDESCRIBEPARAM in bitmap
array returned by SQLGetFunctions.