Click here to Skip to main content
15,921,716 members
Home / Discussions / Database
   

Database

 
GeneralRe: ADODB Recordset Question Pin
Steve S20-Aug-03 22:54
Steve S20-Aug-03 22:54 
GeneralRe: ADODB Recordset Question Pin
Hesham Amin21-Aug-03 5:26
Hesham Amin21-Aug-03 5:26 
GeneralRe: ADODB Recordset Question Pin
Steve S21-Aug-03 6:37
Steve S21-Aug-03 6:37 
GeneralRe: ADODB Recordset Question Pin
Abin21-Aug-03 15:48
Abin21-Aug-03 15:48 
GeneralInserting DateTime value Pin
Francis B.20-Aug-03 5:32
Francis B.20-Aug-03 5:32 
GeneralRe: Inserting DateTime value Pin
Marcel Härry25-Aug-03 11:34
Marcel Härry25-Aug-03 11:34 
Generalget the newly create record ID Pin
Jerome Conus19-Aug-03 23:20
Jerome Conus19-Aug-03 23:20 
GeneralRe: get the newly create record ID Pin
Alexandru Savescu20-Aug-03 0:34
Alexandru Savescu20-Aug-03 0:34 
I ran into the same situation. You have this solutions:

1. If your application uses only one server and all users connect to that server to write data in the database then you can use a critical section at the application level to lock the application when doing this:
a. Insert new value
b. Select MAx (ID)

2. Get rid of autoincrement values. Use a new table (say ID_Generator) that holds a table name and the max reached value. Then, to insert a unique id you would do this:
a. UPDATE ID_GENERATOR SET IDValue = IDValue + 1 WHERE TableName = 'MYTable'. This ensures that the page is locked during the update process
b. SELECT IDValue FROM ID_GENERATOR WHERE TableName = 'MyTable';

I prefer the second solution since it gives me complete control over IDs.

Best regards,
Alexandru Savescu

P.S. Interested in art? Visit this!
GeneralRe: get the newly create record ID Pin
Steve S20-Aug-03 0:50
Steve S20-Aug-03 0:50 
GeneralRe: get the newly create record ID Pin
Dr_Sh0ck24-Aug-03 23:52
Dr_Sh0ck24-Aug-03 23:52 
GeneralRe: get the newly create record ID Pin
Tom Archer25-Aug-03 15:41
Tom Archer25-Aug-03 15:41 
GeneralRe: get the newly create record ID Pin
Jerome Conus25-Aug-03 19:02
Jerome Conus25-Aug-03 19:02 
GeneralRe: get the newly create record ID Pin
Tom Archer26-Aug-03 2:00
Tom Archer26-Aug-03 2:00 
QuestionOleDB or Sql? Pin
Alexandru Savescu19-Aug-03 22:28
Alexandru Savescu19-Aug-03 22:28 
AnswerRe: OleDB or Sql? Pin
Brad Sokol22-Aug-03 2:58
Brad Sokol22-Aug-03 2:58 
GeneralNO_DATA - no error information available Pin
bpchia19-Aug-03 20:10
bpchia19-Aug-03 20:10 
GeneralRe: NO_DATA - no error information available Pin
bpchia22-Aug-03 1:43
bpchia22-Aug-03 1:43 
Generalstumped Pin
Shotgun19-Aug-03 18:34
Shotgun19-Aug-03 18:34 
GeneralRe: stumped Pin
Rocky Moore19-Aug-03 22:58
Rocky Moore19-Aug-03 22:58 
GeneralRe: stumped Pin
Shotgun20-Aug-03 1:44
Shotgun20-Aug-03 1:44 
GeneralHelp with sql trigger Pin
Ista19-Aug-03 11:32
Ista19-Aug-03 11:32 
GeneralRe: Help with sql trigger Pin
Jason McBurney21-Aug-03 4:54
Jason McBurney21-Aug-03 4:54 
GeneralRe: Help with sql trigger Pin
Ista21-Aug-03 4:56
Ista21-Aug-03 4:56 
GeneralRe: Help with sql trigger Pin
Mike Dimmick22-Aug-03 4:04
Mike Dimmick22-Aug-03 4:04 
GeneralRe: Help with sql trigger Pin
Ista22-Aug-03 4:11
Ista22-Aug-03 4:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.