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

Database

 
GeneralRe: Urgent about connection to MSDE 2000 Pin
wk_vigorous10-Nov-04 5:53
wk_vigorous10-Nov-04 5:53 
GeneralRe: Urgent about connection to MSDE 2000 Pin
Richard Deeming10-Nov-04 7:42
mveRichard Deeming10-Nov-04 7:42 
GeneralRe: Urgent about connection to MSDE 2000 Pin
wk_vigorous10-Nov-04 22:56
wk_vigorous10-Nov-04 22:56 
GeneralA couple of SQLXML issues Pin
RichardGrimmer9-Nov-04 22:03
RichardGrimmer9-Nov-04 22:03 
GeneralA custom key Pin
totig9-Nov-04 21:56
totig9-Nov-04 21:56 
GeneralRe: A custom key Pin
Mekong River10-Nov-04 4:14
Mekong River10-Nov-04 4:14 
GeneralRe: A custom key Pin
totig10-Nov-04 19:26
totig10-Nov-04 19:26 
GeneralRe: A custom key Pin
Colin Angus Mackay10-Nov-04 6:53
Colin Angus Mackay10-Nov-04 6:53 
You could create a second table which contains a list of deleted numbers. If the table is empty the the next number you use is MAX(numberColumn)+1.

In order to populate the deleted numbers table you can create a delete trigger on the original table and insert the relevant row. When you are inserting a new record just take a number from the deleted numbers table and use that - remember to remove it from the deleted numbers table. You could create an insert trigger to do this for you.

However, this will still leave gaps in your sequence if you delete a row and don't insert one afterwards.




Do you want to know more?


QuestionHow to update record Pin
Mekong River9-Nov-04 17:20
Mekong River9-Nov-04 17:20 
AnswerRe: How to update record Pin
Mekong River9-Nov-04 17:46
Mekong River9-Nov-04 17:46 
Generalado and radio button Pin
skicrud9-Nov-04 6:06
skicrud9-Nov-04 6:06 
GeneralRe: ado and radio button Pin
Mekong River9-Nov-04 14:28
Mekong River9-Nov-04 14:28 
GeneralDAO and transactions Pin
calliscope9-Nov-04 5:34
calliscope9-Nov-04 5:34 
Generalusing SQL Distinct Pin
Ahmed Galal9-Nov-04 2:44
Ahmed Galal9-Nov-04 2:44 
GeneralRe: using SQL Distinct Pin
Colin Angus Mackay9-Nov-04 10:42
Colin Angus Mackay9-Nov-04 10:42 
GeneralRe: using SQL Distinct Pin
Ahmed Galal10-Nov-04 2:11
Ahmed Galal10-Nov-04 2:11 
GeneralSql Error Pin
nacp8-Nov-04 23:24
nacp8-Nov-04 23:24 
GeneralRe: Sql Error Pin
David Salter8-Nov-04 23:26
David Salter8-Nov-04 23:26 
GeneralRe: Sql Error Pin
Mekong River9-Nov-04 14:32
Mekong River9-Nov-04 14:32 
QuestionPrecision and Scale ? Pin
0v3rloader8-Nov-04 4:32
0v3rloader8-Nov-04 4:32 
AnswerRe: Precision and Scale ? Pin
Richard Deeming8-Nov-04 4:45
mveRichard Deeming8-Nov-04 4:45 
GeneralSQLite Pin
Steve S8-Nov-04 0:46
Steve S8-Nov-04 0:46 
GeneralSQL Server Management API Pin
Its due when7-Nov-04 18:33
Its due when7-Nov-04 18:33 
GeneralTrouble in updating source in ADO Pin
wicked_guy7-Nov-04 2:13
wicked_guy7-Nov-04 2:13 
GeneralFrom one database to another (DataSets & .NET) Pin
Jon Rista5-Nov-04 9:28
Jon Rista5-Nov-04 9:28 

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.