?
Solved

The ORA-00911 Invalid Character error and my INSERT from VB

Posted on 2003-03-29
4
Medium Priority
?
10,227 Views
Last Modified: 2013-12-12
HELLO, ALL!

I have been troubled by an INSERT sentence that seems to be having problems ONLY when executed from an ADODB.Connection object in Visual Basic 6.

If I execute this from SQL+, I have no problems, but when executed from the CONNECTION or the COMMAND objects, I get the ORA-00911 Invalid Character error message. Can you possibly see any character that can be replaced or that isn't accepted by Oracle?

insert into CANDIDATOS(NUMBER_SOLIC, NAME, ....)
 values (688,'Jesús','Aispuro','Altamirano',' ',0,' ','','H','O',' ','0',NULL,0,' ',' ',120,28,NULL,NULL,'','XX','MEXICANA',0,0,'N',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'N','N',NULL,'',NULL,'N',NULL,0,0,'','','N','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','',NULL,TO_DATE('2003-03-28','YYYY-MM-DD'),'S',1,TO_DATE('2003-03-28','YYYY-MM-DD'),0,0,TO_DATE('1978-05-23','YYYY-MM-DD'),'650',NULL,NULL,TO_DATE('2003-03-28','YYYY-MM-DD'),10,'',NULL,120,28,NULL);

Thank you so much for any help you could provide!
0
Comment
Question by:luisarmandon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 2

Accepted Solution

by:
ypwitkow earned 200 total points
ID: 8237321
Delete ; on the end of statement.

Greetings,
Lucy
0
 

Expert Comment

by:RamaDevi
ID: 8251027
And also verify that you have put the proper quotes when using inside the connection objects.

Thanks,
Rama Devi
0
 

Author Comment

by:luisarmandon
ID: 8255795
In fact, it WAS something as obvious like that, dear Lucy.

Thanx thanx very much for opening my eyes.

Luis
0
 

Expert Comment

by:Piyu75
ID: 13896948
I get same error (Invalid Character) if I try to run multiple statements in one query through vb6, ADODB connection
Mysql =  "DELETE TBLTEST1;" & _
" DELETE TBLTEST2;"
rs.Open MySQL, DBConn, adOpenStatic, adLockOptimistic
If I get rid of ; then I get a message "Statement not ended properly"
I can run single statements successfully.

Help
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to recover a database from a user managed backup
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question