Solved

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

Posted on 2004-04-02
3
471 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
3 Comments
 
LVL 9

Accepted Solution

by:
glsac earned 200 total points
ID: 10752128
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

820 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