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

SQLNumParams not called

2 views
Skip to first unread message

foxy.md

unread,
May 14, 2009, 8:48:36 AM5/14/09
to
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.

Pak-Ming Cheung - MSFT

unread,
May 21, 2009, 12:26:01 AM5/21/09
to
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.microsoft.com/downloads/details.aspx?FamilyID=4377f86d-c913-4b5c-b87e-ef72e5b4e065&displaylang=en&Hash=raENJbos8HATZNlmmiQHcjnsUV5hOMFy7J1PezdapbyjI%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://social.msdn.microsoft.com/forums/en-US/sqldataaccess/threads/)

foxy.md

unread,
May 22, 2009, 11:19:50 AM5/22/09
to
Thanks a LOT !
I'll try to run the OleDB conformance test.

foxy.md

unread,
Jun 2, 2009, 7:14:56 AM6/2/09
to
Problem solved. I forgot to include SQL_API_SQLDESCRIBEPARAM in bitmap
array returned by SQLGetFunctions.
0 new messages