|
-
May 14th, 2007, 04:31 PM
#1
Thread Starter
Hyperactive Member
[2.0]
I have a data table with data in it.
I want to insert data from this data table into a physical table in oracle. If both tables are in oracle then by using the sql I could insert like
insert into temp2 (select * from temp1).
temp1 and temp2 are oracle tables. but in my situation, temp1 is a datatable. How can I do this?
thanks
nath
-
May 14th, 2007, 05:45 PM
#2
Re: [2.0]
Create a DataAdapter. Create a Command with the appropriate SQL in its CommandText property. Add a parameter for each column being inserted. Assign the Command to the InsertCommand property of the DataAdapter. Call the Update method of the DataAdapter.
-
May 14th, 2007, 06:31 PM
#3
Thread Starter
Hyperactive Member
Re: [2.0]
Howdy Jm,
can you point me to a link/sample that does this?
thanks
nath
-
May 14th, 2007, 06:39 PM
#4
Re: [2.0]
This is for SQL Server but the same principles apply to Oracle. Just change the types to the appropriate namespace. I'll leave it to you to convert it to C#.
-
May 14th, 2007, 06:53 PM
#5
Thread Starter
Hyperactive Member
Re: [2.0]
thanks Jm.
I will use it.
regards
nath
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|