Hi all
Im trying to sort out this issue. I'm using Oracle database and C#, The error I got System.Data.OracleClient.OracleException: ORA-01036: illegal variable name/number. I don't know how I can solve it. I tried to remove the @ in the parameters or even replace them like p.Course_id, then ?p.course, p_course_id but nothing changed.
Please help sort out this issue. Thank you
My code
command.Parameters.Add("course_Id", OracleType.Int).Value = course_Id;
command.Parameters.Add("question", OracleType.VarChar).Value = question;
command.Parameters.Add("posterName", OracleType.VarChar).Value = posterName;
command.Parameters.Add("blogdate", OracleType.DateTime).Value = blog_date;
Loading
AlexPosted Mar 1, 2014, 11:20 PM
Thank you for your help.
VulpesPosted Mar 1, 2014, 1:10 PM
http://msdn.microsoft.com/en-us/library/system.data.oracleclient.oracletype(v=vs.100).aspx
AlexPosted Feb 28, 2014, 9:16 PM
VulpesPosted Feb 28, 2014, 8:54 PM
http://docs.oracle.com/cd/B19306_01/win.102/b14307/OracleDbTypeEnumerationType.htm
When I was looking for that, I came across this link :
http://docs.oracle.com/cd/B19306_01/win.102/b14307/extenBoth.htm
You'll notice that ":1" is used here for the only parameter. So I wonder whether you should use a colon after all but number the parameters rather than using their names?
AlexPosted Feb 28, 2014, 8:33 PM
VulpesPosted Feb 28, 2014, 8:20 PM
I've been looking for examples of calling stored procedures which take parameters and they all seem to not use any marker at all. Check this thread for example:
http://forums.codeguru.com/showthread.php?475415-How-to-call-Oracle-stored-procedure-using-C
That would therefore suggest you simply use:
AlexPosted Feb 28, 2014, 8:07 PM
System.Data.OracleClient.OracleException: ORA-06550: line 1, column 31:
PLS-00103: Encountered the symbol ":" when expecting one of the following:
( - + case mod new not null
continue avg count current exists max min prior sql stddev
sum variance execute forall merge time timestamp interval
date
pipe
PLS-00103: Encountered the symbol ":" when expecting one of the following:
( - + case mod new not null
continue avg count current exists max min prior sql
ORA-06550: line 1, column 80:
PLS-00103: Encountered the symbol ":" when expecting one of the following:
( - + case mod new not null
VulpesPosted Feb 28, 2014, 7:54 PM
command.Parameters.Add(":course_Id", SqlDbType.Int).Value = course_Id;
command.Parameters.Add(":question", SqlDbType.VarChar).Value = question;
command.Parameters.Add(":posterName", SqlDbType.VarChar).Value = posterName;
command.Parameters.Add(":blogdate", SqlDbType.DateTime).Value = blog_date;