Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you insert a row into TableA fromTableB in the same DATASET? 1

Status
Not open for further replies.

mb22

Programmer
Sep 4, 2002
258
US
if i have 2 exact SAME tables in a dataset say ... TableA and TableB.

how can I do this?

"INSERT into TableA SELECT * from TableB where Cust_ID=10"

the tables have too many columns for me to add a New row .. and the populate each column for the new row.

sample code will help .. thanks VB.Net
 
depends on how many rows you have to copy but put this in a loop and put a dataview on the tableB

Code:
datset1.Tables("tableA").Rows.Add(datset1.Tables("TableB").Rows(0))


Christiaan Baes
Belgium

What a wonderfull world - Louis armstrong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top