For Programmers: Free Programming Magazines  


Home > Archive > Clarion > September 2005 > SQL autonumbering for multiple clients









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQL autonumbering for multiple clients
danfriedman@gmail.com

2005-09-22, 6:55 pm

Hello everyone,

I've read all the threads here that mention SQL and autonumbering and
most people seem to say that multiple users/clients updating the SQL
database simultaneously using Clarion's autonumbering will work fine.

Having said that, does anyone know what the Clarion SQL driver is
actually saying on the backend to the server? I see that the ABC code
gets records() for the table and adds one to it, but there must be
something else going on in the driver for it to be more atomic,
otherwise couldn't there very easily be a potential conflict or race
condition between multiple clients?

How can an app be getting the max records, adding one, then writing a
record without worrying about another app doing the exact same thing
right before it? If it checks and sees that there are 10 records,
decides the next unique ID is 11, and in the meantime another app does
the same thing before it has written, isn't that a conflict? This is
all assuming Clarion's autonumbering is being used, and not SQL's
built-in autonumbering which I have read causes other problems.

Thanks for any insight,
Dan

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com