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. Advertisements

  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. Advertisements

  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. Advertisements

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,945
    Markus
    Nov 23, 2005
  2. Brett Selleck

    Schema Metadata not a Metadata Schema

    Brett Selleck, Sep 4, 2003, in forum: XML
    Replies:
    1
    Views:
    609
    Andy Dingley
    Sep 4, 2003
  3. Fred Smith
    Replies:
    1
    Views:
    1,213
    Martin Honnen
    Feb 5, 2004
  4. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,581
    Stanimir Stamenkov
    Apr 25, 2005
  5. Steve B.
    Replies:
    4
    Views:
    1,217
    Cheryl D Wise
    Jun 1, 2007
  6. Paul Martin

    Target Schema in designer?

    Paul Martin, Feb 2, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    167
    Paul Martin
    Feb 2, 2004
  7. Alexander Higgins
    Replies:
    3
    Views:
    1,296
    Teemu Keiski
    Jul 30, 2007
  8. Alexander Higgins
    Replies:
    0
    Views:
    626
    Alexander Higgins
    Jul 21, 2007
Loading...