Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Every time when user hears one music on system, the system stores this music to recent list, but I am afraid to pass over than decimal(19,0) limit in future. If I do Reseed I will get some problems insert invalid duplicate pirmary keys, but if I reallocate all id's it is possible.

Is there a better way for that? With possibility to clean the jump of id (55-60) without future headache with Primary key overflow? Note: I can limit this list for 255(smallint) maybe, but I want evade use same id`s.

share|improve this question
2  
What is your native language? Perhaps if you post your question in your native language someone here can translate it to english correctly. Currently, this question makes almost no sense (though I think you have a valid question, it's just really hard to decipher) –  Jimmy Hoffa Mar 19 '13 at 19:39
    
Thanks, at the moment I think I will use 2 collums of user table to save first id and last id on list table, so I overwrite if the max is reached, so I consult DB whit orderby DESC and get the last view. But I will get trouble when 2 users make your register at same time and get same id range. –  Lucas Rodrigues Sena Mar 19 '13 at 22:36

1 Answer 1

up vote 0 down vote accepted

Whit native C#, I did on system whit each ID_User number multiplies one logic using each ID getting one range of id whit this calc in another table whit identity AUTOSEED disabled, prevent out range and I can use any row of this table.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.