dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Request

  1. #1
    Join Date
    May 2009
    Posts
    1

    Question Request

    if I got 10 pc, users are click save button to save the data into database at the same time
    Can I know which data will be save into database first?
    It is depends on what to save that record into database first?

  2. #2
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496

    Re: Request

    Quote Originally Posted by carrielucky View Post
    if I got 10 pc, users are click save button to save the data into database at the same time
    Can I know which data will be save into database first?
    It is depends on what to save that record into database first?
    You cannot tell who will get to write first and in most cases you don't care to know either. Besides, allowing multiple users to write data indiscriminately will most likely corrupt your data.

    When working with databases you should employ locks and transactions to manage concurrent data access.

    The lock and transaction concepts can be applied to data that is not organized in a database but depending on the API you use to access that data it can be much more complicated.
    Har Har

  3. #3
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,555

    Re: Request

    A good database ought to handle concurrent users without anything getting corrupted. I don't know of any to guaranty who gets processed first if they all write at the same time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)