Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 29th, 2004, 07:32 PM
Registered User
 
Join Date: Nov 2004
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.

 
Old December 3rd, 2004, 06:20 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
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





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 05:18 PM
Connecting to Oracle without Oracle Client mahaveerar Excel VBA 0 February 22nd, 2005 03:55 PM





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