Calling Stored Procedure From ADO.NET Results in SQLCODE: -188 (330096)
The information in this article applies to:
- Microsoft Host Integration Server 2000
This article was previously published under Q330096 SYMPTOMS
Note: This article also applies to Microsoft Host Integration Server 2000 Service Pack 1 (SP1).
Calling a Stored Procedure from ADO.NET using the Microsoft OLE DB Provider for DB2 results in the following error:
A SQL error has occurred. Please consult the documentation for your
specific DB2 version for a description of the associated Native Error
and SQL State. SQLSTATE: 22503, SQLCODE: -188
CAUSE
The OLE DB Provider for DB2 does not correctly parse the command used to call a Stored Procedure that is received from ADO.NET.
RESOLUTIONService pack information To resolve this problem, obtain the latest service pack for Microsoft Host Integration Server 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base: 328152 How to obtain the latest service pack for Host Integration Server 2000 Hotfix information
The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date Time Version Size File name
--------------------------------------------------
17-Oct-2002 17:58 5.0.0.900 880,912 Mseidb2d.dll
17-Oct-2002 17:58 5.0.0.900 262,416 Mseidrda.dll
NOTE: Because of file dependencies, the most recent fix that contains the preceding files may also contain additional files.
WORKAROUND
The problem does not occur if the call to the Stored Procedure is passed as command text. The following C# code excerpt can be used as an example:
OleDbCommand myCommand = new OleDbCommand("CALL <stored procedure name>(?)", myConnection);
myCommand.CommandType = CommandType.Text;
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
This problem was corrected in Microsoft Host Integration Server 2000 Service Pack 2.
Modification Type: | Minor | Last Reviewed: | 9/27/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbQFE kbbug kbfix KB330096 kbAudDeveloper |
---|
|