p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 (http://p2p.wrox.com/forumdisplay.php?f=34)
-   -   Chapter 16 - Oracle Client - BindingExample (http://p2p.wrox.com/showthread.php?t=21868)

andy_study November 29th, 2004 07:32 PM

Chapter 16 - Oracle Client - BindingExample
[u]Chapter 16 - Oracle Client - BindingExample</u>

I am not able to add new records using the following Insert sql statements when importing the System.Data.OracleClient Namespace:

  objCommand.CommandText = "INSERT INTO titles " & _
            "(title_id, title, type, price, pubdate) " & _
            "VALUES(:title_id,:title,:type,:price,:pubdate );" & _
            "INSERT INTO titleauthor (au_id, title_id) VALUES

An Oracle exception is reported, "ORA-00911: invalid character". The error appears to be as result of the ";". I am currently updating the Oracle database by removing the ";" and executing the INSERT SQL's individually.

A solution to this problem will be highly appreciated.


Thearon December 3rd, 2004 06:20 AM


It seems that although Oracle requires a semicolon in its syntax in views and stored procedures, it is no valid in the OracleCommand object. You need to remove the semicolon at the end of your insert statement. This also means that you’ll only be able to execute one insert statement at a time.


All times are GMT -4. The time now is 12:26 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.