Avatar of ciphersol
ciphersol
 asked on

ORA-01036 error because of comment and text contained within comment.

I am using the "Oracle.DataAccess" class library with VB.NET.  The code executes SQL statements that apply updates to a database.   I have found an unusual issue where I receive the error "ORA-01036: illegal variable name/number" when executing the following statement:

CREATE OR REPLACE PROCEDURE TEST_PROC IS
BEGIN
NULL;
/** COMMENT: */
END TEST_PROC;

The error can be eliminated by modifying the comment from "/**" to "/*" so that the statement looks like the following:

CREATE OR REPLACE PROCEDURE TEST_PROC IS
BEGIN
NULL;
/* COMMENT: */
END TEST_PROC;

The command runs perfectly fine in SQL*Plus but not using the "Oracle.DataAccess" class (ExecuteNonQuery command).  Modifying the statement is not an option.

Any ideas on how to correct this problem?

Oracle Database Version:  Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
Oracle.DataAccess Version: 9.2.0.700   and  10.2.0.100
Oracle Database.NET Programming

Avatar of undefined
Last Comment
ciphersol

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Devinder Singh Virdi

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
schwertner

--  COMMENT:  

is another way to comment lines.
I mean two minuses (--)
Devinder Singh Virdi

I am not sure about what i am going to write, but this comment resembles more like hint /** COMMENT: */ rather than comment, may be that the reason. so you can try '--' or '/*  */' comments
ciphersol

ASKER
virdi ds,
It turns out this error occurred because I added an output parameter just prior to running the "ExecuteNonQuery" command.  There is no output parameter in this case so it was unnecessary.

I wouldn't have discovered this if it was for initial request to paste the complete code.  I discovered this was the issue when I was preparing the sample code snippet for you,  therefore I'll give you partial credit.  :)
Your help has saved me hundreds of hours of internet surfing.
fblack61