Microsoft Knowledge Base Email Alertz

When run against an IBM DB2 database that is installed on an OS390 server,

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 291999 - Last Review: December 3, 2003 - Revision: 3.1

PRB: DB2 Stored Procedures on OS390 Return Invalid Parameter Information

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.

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
Keywords: 
kb3rdparty kbprb KB291999
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate