refresh schema in designer

N

norm

I create a dataadapter by dragging onto the design surface and create the
dataset.
If I make changes to the SQL table, how do I get the dataadapter to see the
new table changes? Do I have to make the changes manually, or is there a
refresh method?

thanks
norm
 
M

mona

Hi Norm

There is no refresh method for Data Adapter to reflect the changes made in the SQL table,
and the solution for your problem would be to rebuild the data Adapter thus enabling application
to work with the SQL database that has been changed. You can also try making changes to the
database through Datasets, it would improve the performance too.

You can use the following code snippet to do the same:

DataAdapter.Update(Dataset)
DataSet.AcceptChanges()

The Update method of the DataAdapter is called to resolve changes from aDataset back to the data source.
The DataAdapter analyzes the chnges that have been made and executes the appropriate command(INSERT<DELETE or UPDATE)

The Dataset.AcceptChanges Method commits all the changes made to the dataset since last time AcceptChanges was called.
HTH

Mona[Grapecity]
 
N

norm

Thanks Mona


I forgot about just rebuilding the dataaadapter.

Norm

Hi Norm

There is no refresh method for Data Adapter to reflect the changes made in the SQL table,
and the solution for your problem would be to rebuild the data Adapter thus enabling application
to work with the SQL database that has been changed. You can also try making changes to the
database through Datasets, it would improve the performance too.

You can use the following code snippet to do the same:

DataAdapter.Update(Dataset)
DataSet.AcceptChanges()

The Update method of the DataAdapter is called to resolve changes from aDataset back to the data source.
The DataAdapter analyzes the chnges that have been made and executes the appropriate command(INSERT<DELETE or UPDATE)

The Dataset.AcceptChanges Method commits all the changes made to the dataset since last time AcceptChanges was called.
HTH

Mona[Grapecity]
 

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

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top