Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting ORA-00911: Invalid character

Status
Not open for further replies.

BigM

Programmer
Aug 30, 2000
39
GB
Hi,

I am getting the following error when running my update statement.

Microsoft OLE DB Provider for Oracle error '80040e14'
ORA-00911: invalid character

The SQL statement does NOT contain invalid characters as I can cut and paste it into a SQL session and it runs fine.

Statement is as follows

-----------------------------------------------------------
strShowSQL = "UPDATE bv_prt_link_main SET status = 1 WHERE oid IN (8769,8637);"

Set rs = conn.execute(strShowSQL)
-----------------------------------------------------------

Any Ideas People

Thanks
 
I am not very experienced with Oracle, but maybe status is a reserved Word for Oracle. Check it out, and let me know if you still get the error.


<webguru>iqof188</webguru>
 
Hi,

If status was an Oracle reserved word then I would get the same error when I ran the statement in a SQL*Plus session.

 
I think it's because you must do a commit under Oracle PL*SQL like :

UPDATE bv_prt_link_main SET status = 1 WHERE oid IN (8769,8637);
commit;

until you don't commit the transaction, the update not really exists. it's the same thing with insert

try and let me know if it fix it !!
 
Yoofs,

It was the semi-colon at the end of the statement. Within SQL*Plus the semi-colon at the end executes the statement.

Obviously this is not required with ADO. So statement should read

-------------------------------------------------
strShowSQL = &quot;UPDATE bv_prt_link_main SET status = 1 WHERE oid IN (8769,8637)&quot;
-------------------------------------------------

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top