Click here to Skip to main content
15,915,093 members
Home / Discussions / C#
   

C#

 
GeneralRe: giving error message according to Sql data Pin
PIEBALDconsult8-Dec-10 14:30
mvePIEBALDconsult8-Dec-10 14:30 
GeneralRe: giving error message according to Sql data Pin
Mycroft Holmes8-Dec-10 12:00
professionalMycroft Holmes8-Dec-10 12:00 
JokeRe: giving error message according to Sql data Pin
Keith Barrow8-Dec-10 10:32
professionalKeith Barrow8-Dec-10 10:32 
AnswerRe: giving error message according to Sql data Pin
Pete O'Hanlon8-Dec-10 11:02
mvePete O'Hanlon8-Dec-10 11:02 
GeneralRe: giving error message according to Sql data Pin
Not Active8-Dec-10 11:46
mentorNot Active8-Dec-10 11:46 
GeneralRe: giving error message according to Sql data Pin
AspDotNetDev8-Dec-10 11:51
protectorAspDotNetDev8-Dec-10 11:51 
GeneralRe: giving error message according to Sql data Pin
Not Active8-Dec-10 12:10
mentorNot Active8-Dec-10 12:10 
GeneralRe: giving error message according to Sql data Pin
Pete O'Hanlon8-Dec-10 12:30
mvePete O'Hanlon8-Dec-10 12:30 
GeneralRe: giving error message according to Sql data Pin
AspDotNetDev8-Dec-10 11:50
protectorAspDotNetDev8-Dec-10 11:50 
GeneralRe: giving error message according to Sql data Pin
Pete O'Hanlon8-Dec-10 11:53
mvePete O'Hanlon8-Dec-10 11:53 
GeneralRe: giving error message according to Sql data Pin
AspDotNetDev8-Dec-10 12:01
protectorAspDotNetDev8-Dec-10 12:01 
GeneralRe: giving error message according to Sql data Pin
PIEBALDconsult8-Dec-10 14:24
mvePIEBALDconsult8-Dec-10 14:24 
AnswerRe: giving error message according to Sql data Pin
Mycroft Holmes8-Dec-10 12:04
professionalMycroft Holmes8-Dec-10 12:04 
GeneralRe: giving error message according to Sql data Pin
PIEBALDconsult8-Dec-10 14:23
mvePIEBALDconsult8-Dec-10 14:23 
GeneralRe: giving error message according to Sql data Pin
_Maxxx_8-Dec-10 15:25
professional_Maxxx_8-Dec-10 15:25 
Mycroft Holmes wrote:
There is no excuse for primary key violation


You're right in that - but the OP didn't have a primary key violation he had a unique constraint violation - which is legitimate.

For example, I am adding new products each of which has a unique id (maybe a GUID or an integer) which will be the primary key.

But the product also requires a human-readable Code - which is also required to be unique.

At some point the user needs to type in the code for a new product - you can check the DB at this point, and tell them to go ahead. Meanwhile another user can try to use the same code, pass the 'does it exist' test, and attempt a commit.

Whoever gets there first will be fine, the 2nd person's commit will fail.
___________________________________________
.\\axxx
(That's an 'M')

GeneralRe: giving error message according to Sql data Pin
Mycroft Holmes8-Dec-10 15:35
professionalMycroft Holmes8-Dec-10 15:35 
GeneralRe: giving error message according to Sql data Pin
_Maxxx_8-Dec-10 19:36
professional_Maxxx_8-Dec-10 19:36 
GeneralRe: giving error message according to Sql data Pin
Mycroft Holmes8-Dec-10 20:08
professionalMycroft Holmes8-Dec-10 20:08 
AnswerRe: giving error message according to Sql data Pin
PIEBALDconsult8-Dec-10 14:30
mvePIEBALDconsult8-Dec-10 14:30 
GeneralRe: giving error message according to Sql data [modified] Pin
Erdinc278-Dec-10 22:05
Erdinc278-Dec-10 22:05 
GeneralRe: giving error message according to Sql data Pin
Pete O'Hanlon9-Dec-10 23:57
mvePete O'Hanlon9-Dec-10 23:57 
AnswerRe: giving error message according to Sql data Pin
Hiren solanki8-Dec-10 23:03
Hiren solanki8-Dec-10 23:03 
GeneralRe: giving error message according to Sql data Pin
Pete O'Hanlon9-Dec-10 0:47
mvePete O'Hanlon9-Dec-10 0:47 
QuestionListview selected item backgroundcolor Pin
peropata8-Dec-10 2:04
peropata8-Dec-10 2:04 
AnswerRe: Listview selected item backgroundcolor Pin
Not Active8-Dec-10 2:17
mentorNot Active8-Dec-10 2:17 

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.