Article ID: 330096
Article Last Modified on 9/27/2005
APPLIES TO
- Microsoft Host Integration Server 2000 Standard Edition
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:
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.
RESOLUTION
Service 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;
STATUS
Microsoft 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.
MORE INFORMATION
ADO.NET sends a command in the following format to the OLE DB Provider when calling a Stored Procedure:
EXEC <stored procedure name> ?
Previous versions of ADO send the same command in the following format when calling a Stored Procedure:
EXEC <stored procedure name>
The SQL parser in the Microsoft OLE DB Provider for DB2 had to be updated to correctly parse the ? included in the ADO.NET format of the command.
Keywords: kbbug kbfix kbqfe kbhotfixserver KB330096