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. 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. Pavel Gusak

    OleDbAdapter.Update failure

    Pavel Gusak, Nov 4, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,520
    Pavel Gusak
    Nov 4, 2003
  2. Hartmut Schroth
    Replies:
    3
    Views:
    3,744
    Hartmut Schroth
    Dec 1, 2003
  3. joun
    Replies:
    9
    Views:
    2,505
    W.G. Ryan eMVP
    Nov 30, 2004
  4. joun
    Replies:
    5
    Views:
    2,929
  5. =?Utf-8?B?TWljaGFlbA==?=

    How to update datagrid after update

    =?Utf-8?B?TWljaGFlbA==?=, Mar 17, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    641
    Alex D.
    Mar 17, 2006
  6. Ilias Lazaridis
    Replies:
    0
    Views:
    861
    Ilias Lazaridis
    Feb 1, 2005
  7. mesut
    Replies:
    0
    Views:
    846
    mesut
    Feb 19, 2007
  8. Evan M.
    Replies:
    1
    Views:
    1,408
    Evan M.
    Apr 18, 2007
Loading...