refresh schema in designer

Discussion in 'ASP .Net' started by norm, Mar 29, 2005.

  1. norm

    norm Guest

    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
    norm, Mar 29, 2005
    #1
    1. Advertising

  2. norm

    mona Guest

    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]



    "norm" <> wrote in message news:%...

    >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
    >
    >
    >
    mona, Mar 30, 2005
    #2
    1. Advertising

  3. norm

    norm Guest

    Thanks Mona


    I forgot about just rebuilding the dataaadapter.

    Norm

    "mona" <> wrote in message news:...
    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]



    "norm" <> wrote in message news:%...

    >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
    >
    >
    >
    norm, Mar 30, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,499
    Markus
    Nov 23, 2005
  2. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,173
    Stanimir Stamenkov
    Apr 25, 2005
  3. Steve B.
    Replies:
    4
    Views:
    953
    Cheryl D Wise
    Jun 1, 2007
  4. Alexander Higgins
    Replies:
    3
    Views:
    1,067
    Teemu Keiski
    Jul 30, 2007
  5. Alexander Higgins
    Replies:
    0
    Views:
    439
    Alexander Higgins
    Jul 21, 2007
Loading...

Share This Page