OleDbAdapter.Update failure

Discussion in 'ASP .Net Web Services' started by Pavel Gusak, Nov 4, 2003.

  1. Pavel Gusak

    Pavel Gusak Guest

    I'm trying to update Access database with data from DataSet in my Web
    Service.
    Does not work. Generates Concurrency violation error, however, nobody works
    with db at the time.
    Can you help me?
    The code is below.
    Thanks.

    protected void DataSetUpdate(DataSet ds, string tableName)
    {
    OleDbDataAdapter adapter;
    OleDbCommandBuilder builder;
    string selectCommand = "SELECT * FROM " + tableName;
    adapter = new OleDbDataAdapter(selectCommand, conn);
    builder = new OleDbCommandBuilder(adapter);
    adapter.InsertCommand = builder.GetInsertCommand();
    adapter.UpdateCommand = builder.GetUpdateCommand();
    adapter.DeleteCommand = builder.GetDeleteCommand();
    //adapter.ContinueUpdateOnError = true;
    adapter.Update(ds, tableName);
    adapter.Dispose();
    }
    Pavel Gusak, Nov 4, 2003
    #1
    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. Pavel Gusak

    OleDbAdapter.Update failure

    Pavel Gusak, Nov 4, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,323
    Pavel Gusak
    Nov 4, 2003
  2. Hartmut Schroth
    Replies:
    3
    Views:
    3,480
    Hartmut Schroth
    Dec 1, 2003
  3. joun
    Replies:
    9
    Views:
    2,215
    W.G. Ryan eMVP
    Nov 30, 2004
  4. Ilias Lazaridis
    Replies:
    0
    Views:
    545
    Ilias Lazaridis
    Feb 1, 2005
  5. Replies:
    0
    Views:
    450
Loading...

Share This Page