Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003
This is the forum to discuss the Wrox book Professional VB.NET 2003 by Bill Evjen, Billy Hollis, Rockford Lhotka, Tim McCarthy, Jonathan Pinnock, Rama Ramachandran, Bill Sheldon; ISBN: 9780764559921
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 29th, 2004, 06:32 PM
Registered User
 
Join Date: Nov 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
            (:au_id,:title_id)"

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.

Thanks.

  #2 (permalink)  
Old December 3rd, 2004, 05:20 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Andy,

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.

Thearon
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 16 Fig 16-11 krsouthern BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 1 July 8th, 2008 12:11 PM
Chapter 16 boyce0324 VB.NET 2002/2003 Basics 1 June 5th, 2007 01:59 AM
Chapter 16 czambran BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 3 April 11th, 2005 11:01 AM
Connecting to Oracle without Oracle Client mahaveerar VB Databases Basics 0 February 22nd, 2005 04:18 PM
Connecting to Oracle without Oracle Client mahaveerar Excel VBA 0 February 22nd, 2005 02:55 PM



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


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