Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I know this is most likely a naive question, but is it possible to have multiple users accessing the same DB at the same time? For instance, if an user is updating a record in one table, and a user is updating a record in another table at the same time, will one of them get an error message?

 

My thinking is that the program should be written so that the connection is only opened at the time that data is retrieved or sent to the DB, and then the connection should be closed. But what if by some freak chance two users make a change at the exact same time?

if(computer.speed == "slow")
    {  
       hamster.feed();  
    }
if(computer.speed == "really slow")
    {  
        hamster.kill();
        BuyNewHamster();
    }

  • Administrators
Posted

Most modern DBs will provide in-built controls to prevent conflicting updates (mainly through the use of locks). Two people updating different tables isn't normally a problem - neither is two people updating the same table (as long as it's not the same record).

 

Out of interest what database are you planning on using?

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

I use Access right now, but I'm thinking about using SQL in my next program. This is the first program that I've written, so I'm still a little wet behind the ears.

 

I was just wondering what would happen in that case. Thanks for the input.

if(computer.speed == "slow")
    {  
       hamster.feed();  
    }
if(computer.speed == "really slow")
    {  
        hamster.kill();
        BuyNewHamster();
    }

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...