Microsoft Knowledge Base Email Alertz

(235299) - 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...

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: 235299 - Last Review: March 10, 2004 - Revision: 1.1

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

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  (http://kbalertz.com/Feedback.aspx?kbNumber=215838/EN-US/ ) 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.

APPLIES TO
  • Microsoft OLE DB Provider for DB2
Keywords: 
kbbug kbfix kbsna400sp3fix KB235299
       

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