can I fill an Access tbl with sqlsrv Adapter?

  • Thread starter Thread starter Rich
  • Start date Start date
R

Rich

Hello,

Is it possible to have 2 tables in a dataset where each
table is from a different source? tbl1 is from sql server
and tbl2 is from Access? Then is it possible to fill the
Access table with the data from the sqlserver table? Like
if I use an adapter to fill the sql table can I use that
adapter to fill the Access table? How is this
accomplished? Or am I limited to using datarow objects
and looping through each table and then updating with the
respective Adapters? Or do I use an Insert Into statment
to insert data from one table to the other and then use
Adapter.Update? what is the best way to transfer data
from a sql resultset to an Access table with ADO.net
(using vb.net)?

Thanks,
Rich
 
DataAdapters fill datatables, and update from datatables, to taht end, they
couldn't care less about how the data got where. However, you can't use a
SqlDataAdapter to update or fill from Access.

SqlDataAdatper.Fill(dataTable);
//do whatever you want to the data
OleDbDataAdapter.Update(dataTable);
//where dataTable is same table.

HTH,

Bill
 

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