Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 10246
  • Last Modified:

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

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
luisarmandon
Asked:
luisarmandon
1 Solution
 
ypwitkowCommented:
Delete ; on the end of statement.

Greetings,
Lucy
0
 
RamaDeviCommented:
And also verify that you have put the proper quotes when using inside the connection objects.

Thanks,
Rama Devi
0
 
luisarmandonAuthor Commented:
In fact, it WAS something as obvious like that, dear Lucy.

Thanx thanx very much for opening my eyes.

Luis
0
 
Piyu75Commented:
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now