Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 180839 - Last Review: October 15, 2003 - Revision: 3.2
FIX: In-line Comments Parsed by Microsoft Oracle Driver
This article was previously published under Q180839
When using in-line comments the Microsoft ODBC for Oracle driver may fail
with the following error message:
"Syntax Error or Access Violation".
The driver is incorrectly parsing in-line comments. So far, the word "IS"
is the only word that has caused the error to occur.
Use the version of the driver that has this problem fixed. See the STATUS section. There is no work around to this problem. You cannot use in-line comments that contain the word "IS" using the currently released version of the driver.
NOTE: Version 1.0 of the Microsoft Oracle driver did not have this problem.
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This problem has been corrected in the
Microsoft Oracle ODBC Driver version 2.573.2927 or higher. This driver is available
in Visual Studio 6.0, the Data Access Data Access Software Development Kit
(SDK) version 2.0 or higher, and Microsoft Data Access Components (MDAC) version 2.0 or higher.
You can download the MDAC package from the following Web address:
In-line comments can be used to send optimizer hints to the Oracle database
engine.
Steps to Reproduce Behavior
Using ODBCTest the problem can be reproduced.
- Open a Full Connection.
- Enter the following SQL:
select empno, ename from emp
where /* This is a comment */
empno = 7369
NOTE: You may need to change the code above to reference a table in your
schema.
- Execute the code.
The following error message is received:
SQLExecDirect:
In:hstmt = 0x00301250, szSqlStr = "select empno, ename from emp
where /* This is a comme...", cbSqlStr = -3 Return: SQL_ERROR=-1
stmt:szSqlState = "42000", *pfNativeError = 0, *pcbErrorMsg = 67,
*ColumnNumber = -2, *RowNumber = -2
MessageText = "[Microsoft][ODBC driver for Oracle]Syntax error or
access violation"
If you remove the word "IS" in the comment you will not get an error
message.
APPLIES TO
- Microsoft Open Database Connectivity 2.0
- Microsoft Open Database Connectivity 2.0
- Microsoft Open Database Connectivity 2.0
- Microsoft Open Database Connectivity 2.0
- Microsoft Data Access Components 2.5
| kbbug kbdatabase kbdriver kbfix kboracle KB180839 |
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