Solved

ora-01722 when using the ODP OracleDataAdapter to update a DataTable

Posted on 2004-04-02
3
473 Views
Last Modified: 2007-12-19
I'm trying to lookup the referential keys in the insert sql (OracleDataAdapter.InsertCommand.CommandText) =

"INSERT INTO CARDS (CARDS.RTU_ID, CARDS.CARD_TYP_ID, CARDS.RACK_NO, CARDS.SLOT_NO) VALUES ((SELECT RTUS.RTU_ID FROM RTUS WHERE RTUS.RTU_CD = :col0), (SELECT CARD_TYPES.CARD_TYP_ID FROM CARD_TYPES WHERE CARD_TYPES.CARD_TYP_CD = :col3), :col1, :col2)"

and keep getting "ora-01722 invalid number".

The bizarre thing is that this works:

"INSERT INTO CARDS (CARDS.RTU_ID, CARDS.CARD_TYP_ID, CARDS.RACK_NO, CARDS.SLOT_NO) VALUES ('1', '1', :col1, :col2)"

and so does this:

"INSERT INTO CARDS (CARDS.RTU_ID, CARDS.CARD_TYP_ID, CARDS.RACK_NO, CARDS.SLOT_NO) VALUES ((SELECT RTUS.RTU_ID FROM RTUS WHERE RTUS.RTU_CD = :col0), (SELECT CARD_TYPES.CARD_TYP_ID FROM CARD_TYPES WHERE CARD_TYPES.CARD_TYP_CD = :col3), '1', '1')"


Any help is appreciated!
0
Comment
Question by:Troy_Lyne
[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
3 Comments
 
LVL 9

Accepted Solution

by:
glsac earned 200 total points
ID: 10752128
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Suggested Courses

738 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