Solved

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

Posted on 2004-04-02
3
463 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
Comment Utility
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem to event 3 49
Converting Newtonsoft.Json.Linq.JToken to a DateTime 4 65
Windows Service with UDP 2 28
String manipulation 15 49
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now