locked
Question about data access with datasets RRS feed

  • Question

  • hi, im new to this forum, to visual basic and to programming languages, so im sorry if this is a too newbie question, here it goes :

    im currently developing an application to be executed on a network with multiusers accessing the database in a server. as far as I understand the dataset is like a in-memory copy of the database for local data managment. This hypotesys is probably very unlikely to happen but lets say we have a datatable and a block in the code which access the same data table(creating instances of the dataset tables classes and filling it with database content) and lets say, add a row in the table, if 2 users access that block at almost same time in a way that(due to network lag or something like that) the second user creates a copy of the database in his dataset before the first user updates the database with his new added row, then when the second user updates the database, the row added by the first user will be deleted right? if this is true(because I dont know if thats the way the whole thing works), is there any way to avoid this?

     

    thanks for the attention and sorry my bad english

    Tuesday, September 26, 2006 12:45 PM

Answers


  • No, the row added by the first user remains in the database. Each user has his own set of data and updates occur independently of one another.

    You may also want to read about handling concurrency issues in ADO.NET since this is also somewhat relevant to your question:

    http://msdn.microsoft.com/msdnmag/issues/04/09/DataPoints/

     

    Tuesday, September 26, 2006 12:59 PM

All replies


  • No, the row added by the first user remains in the database. Each user has his own set of data and updates occur independently of one another.

    You may also want to read about handling concurrency issues in ADO.NET since this is also somewhat relevant to your question:

    http://msdn.microsoft.com/msdnmag/issues/04/09/DataPoints/

     

    Tuesday, September 26, 2006 12:59 PM
  • well after reading the document in the link you wrote I noticed that the first changes will be overwritten by the second, but this really helped me thanks
    Tuesday, September 26, 2006 4:20 PM

  • Well I might have misunderstood but I thought you were referring to rows that were added and not updated. If you were referring to concurrent updates, then yes this is something you need to be aware of.

     

    Tuesday, September 26, 2006 5:24 PM