How to save multiple rows in a database table simultaneously ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do i input and save more than one row in a database table at a time ?
Which control should i use on the form to accept input when i do not know how
many rows i have to add at runtime ?
 
Say your dataset is ds1 and dataadapter is da1 then

dim dsChange as dataset

if ds1.haschanges
dsChange = ds1.getchanges
da1.update(dsChange)
ds1.acceptchanges
end if

You can use a Datagrid to allow multiple changes, take the time to explore
datagride columnstyles and you'll be much more successful.

Bryan
 
Thank you... this worked...

JBK said:
Say your dataset is ds1 and dataadapter is da1 then

dim dsChange as dataset

if ds1.haschanges
dsChange = ds1.getchanges
da1.update(dsChange)
ds1.acceptchanges
end if

You can use a Datagrid to allow multiple changes, take the time to explore
datagride columnstyles and you'll be much more successful.

Bryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top