Microsoft KB Archive/291999

= PRB: DB2 Stored Procedures on OS390 Return Invalid Parameter Information =

Article ID: 291999

Article Last Modified on 12/3/2003

-

APPLIES TO


 * Microsoft OLE DB Provider for ODBC 1.0
 * Microsoft OLE DB Provider for ODBC 1.1
 * Microsoft OLE DB Provider for ODBC 1.5
 * Microsoft OLE DB Provider for ODBC 2.0
 * Microsoft Data Access Components 1.5
 * Microsoft Data Access Components 2.1
 * Microsoft Data Access Components 2.1 Service Pack 2
 * Microsoft Data Access Components 2.1 Service Pack 1
 * Microsoft Data Access Components 2.1 Service Pack 2
 * Microsoft Data Access Components 2.5
 * Microsoft Data Access Components 2.5 Service Pack 1
 * Microsoft Data Access Components 2.6
 * Microsoft Data Access Components 2.7

-



This article was previously published under Q291999



SYMPTOMS
When run against an IBM DB2 database that is installed on an OS390 server, ADODB.Commmand.Parameters.Count returns 0 when > 0 is expected. Any attempt to address elements of the parameters collection results in the following error message:

80040e51 Provider cannot derive parameter info.



CAUSE
The requisite ODBC calls to determine parameter information (SQLDescribeParam and SQLNumParam) are equivalent to the OLEDB CImpICommandWithParameters::GetParameterInfo. Kagera uses both of these ODBC calls through its GetParameterInfo implementation. However, the available ODBC drivers for DB2 5.x support only the SQLNumParam call as version 5.x DRDA drivers (native/internal database drivers for DB/2) also did not support SQLDescribeParam. Therefore, calls to GetParameterInfo with DB2 5.x drivers result in the error DB_E_PARAMUNAVAILABLE which correctly indicates that Kagera was unable to implement GetParameterInfo.



RESOLUTION
SQLDescribeParam is supported in DRDA v 6.2 (IBM DB2 client software packages with version numbers 6.2 or newer).

Alternately, executing stored procedures through ADO against OS390 DB2 installations is successful provided that members and properties of the Parameters collection are not addressed explicitly.

Keywords: kbprb kb3rdparty KB291999

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.