-
[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
-
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.
-
Re: [2.0]
Howdy Jm,
can you point me to a link/sample that does this?
thanks
nath
-
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#.
-
Re: [2.0]
thanks Jm.
I will use it.
regards
nath