Microsoft KB Archive/235299

= BUG: Parameterized Queries that Are Not Prepared Fail to Execute Through DB2OLEDB =

Article ID: 235299

Article Last Modified on 3/10/2004

-

APPLIES TO


 * Microsoft OLE DB Provider for DB2

-



This article was previously published under Q235299



SYMPTOMS
When you run a query containing parameter markers like the following:

UPDATE EMPLOYEE SET DEPTNO = 20 WHERE DEPTNO = ?

and the query is not prepared using the ICommandPrepare::Prepare method, the OLE DB Provider for DB2 returns E_FAIL with the following error message:

Statement not prepared.



RESOLUTION
To resolve this problem, obtain the latest service pack for SNA Server version 4.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

215838 How to Obtain the Latest SNA Server Version 4.0 Service Pack



WORKAROUND
Prepare the command using the ICommandPrepare::Prepare method.



STATUS
Microsoft has confirmed that this is a problem in Microsoft SNA Server version 4.0 Service Pack 2. This problem was first corrected in SNA Server version 4.0 Service Pack 3.

Additional query words: MSDB2OLE Mainframe AS/400 MVS OS/390 OS/400

Keywords: kbbug kbfix kbsna400sp3fix KB235299

-

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

© Microsoft Corporation. All rights reserved.