Question copy the records of dataTable in another table

anwar_fasi@yaho.com

New member
Joined
Jun 29, 2011
Messages
1
Programming Experience
3-5
I need to copy the records of dataTable in another table and in database. so I was writing..


adapter.insertCommand="Insert into SourceTable (select * from " & DataTable &")"

but this code doesn't work..
please help me out..
 
Hi and welcome to the Forum,

Before you start to write code I suggest that you take the time to think through and logically write down how you need to achieve this since that code snippet you posted tells me two things:-

1) You are unsure how to code this yet since that code does really not mean anything.
2) You say "Insert Into SourceTable ...." but a Source Table would typically indicate where your records are coming from and not where your records need to end up at. That should be a Destination Table.

In addition to this, if you search this Forum, you will find examples of this from both myself and jmcilhinney that I know of.

Hope that helps.

Cheers,

Ian
 
Back
Top