Click here to Skip to main content
16,007,443 members
Home / Discussions / C#
   

C#

 
GeneralRe: why button_click event raising 2 times? Pin
Greg Chelstowski31-Mar-09 4:57
Greg Chelstowski31-Mar-09 4:57 
AnswerRe: why button_click event raising 2 times? Pin
Xmen Real 31-Mar-09 4:08
professional Xmen Real 31-Mar-09 4:08 
GeneralRe: why button_click event raising 2 times? Pin
Narendra Reddy Vajrala31-Mar-09 4:18
Narendra Reddy Vajrala31-Mar-09 4:18 
GeneralRe: why button_click event raising 2 times? Pin
Xmen Real 31-Mar-09 4:25
professional Xmen Real 31-Mar-09 4:25 
GeneralRe: why button_click event raising 2 times? Pin
Narendra Reddy Vajrala31-Mar-09 4:30
Narendra Reddy Vajrala31-Mar-09 4:30 
QuestionError : unique constraint violated in C# .NET program Pin
Murtuza Husain Miyan Patel31-Mar-09 3:41
professionalMurtuza Husain Miyan Patel31-Mar-09 3:41 
AnswerRe: Error : unique constraint violated in C# .NET program Pin
harold aptroot31-Mar-09 3:43
harold aptroot31-Mar-09 3:43 
AnswerRe: Error : unique constraint violated in C# .NET program Pin
Ian Shlasko31-Mar-09 3:50
Ian Shlasko31-Mar-09 3:50 
I don't remember the Oracle syntax for it, but the major RDBMSes usually an auto-increment or identity field of some sort. If you use that for the ID, the database will automatically generate a new value when the record is inserted.

Failing that, a few alternatives:

1) Put it all in one DB transaction using a temporary variable. That means get the next index and insert the new record as one combined operation, so nothing can happen in between.

OR

2) Create a stored procedure on the database that inserts the record and returns the ID (If you need to know the ID). Again, keep the entire operation on the database side.

OR

3) If you must do it all on the client side, catch the exception, wait a random number of seconds or milliseconds, and repeat the operation (Checking for the next ID again). This solution is less than optimal, but it's commonly used in certain network protocols.
AnswerRe: Error : unique constraint violated in C# .NET program Pin
Curtis Schlak.1-Apr-09 6:12
Curtis Schlak.1-Apr-09 6:12 
QuestionDataView with rowFilter displayed rows count Pin
kanchoette31-Mar-09 2:01
kanchoette31-Mar-09 2:01 
AnswerRe: DataView with rowFilter displayed rows count Pin
vinodkrebc31-Mar-09 2:02
vinodkrebc31-Mar-09 2:02 
AnswerRe: DataView with rowFilter displayed rows count Pin
Ian Shlasko31-Mar-09 3:28
Ian Shlasko31-Mar-09 3:28 
GeneralRe: DataView with rowFilter displayed rows count Pin
kanchoette31-Mar-09 3:31
kanchoette31-Mar-09 3:31 
Questionremote file copping problem Pin
yogesh_softworld12331-Mar-09 1:29
yogesh_softworld12331-Mar-09 1:29 
AnswerRe: remote file copping problem Pin
Colin Angus Mackay31-Mar-09 1:35
Colin Angus Mackay31-Mar-09 1:35 
GeneralRe: remote file copping problem Pin
yogesh_softworld12331-Mar-09 2:53
yogesh_softworld12331-Mar-09 2:53 
GeneralRe: remote file copping problem Pin
King Julien31-Mar-09 1:47
King Julien31-Mar-09 1:47 
RantRe: remote file copping problem Pin
musefan31-Mar-09 1:59
musefan31-Mar-09 1:59 
GeneralRe: remote file copping problem Pin
yogesh_softworld12331-Mar-09 3:10
yogesh_softworld12331-Mar-09 3:10 
GeneralRe: remote file copping problem Pin
musefan31-Mar-09 3:14
musefan31-Mar-09 3:14 
JokeRe: remote file copping problem Pin
Luc Pattyn31-Mar-09 5:03
sitebuilderLuc Pattyn31-Mar-09 5:03 
JokeRe: remote file copping problem Pin
musefan31-Mar-09 5:07
musefan31-Mar-09 5:07 
GeneralRe: remote file copping problem Pin
Colin Angus Mackay31-Mar-09 4:37
Colin Angus Mackay31-Mar-09 4:37 
GeneralRe: remote file copping problem Pin
DaveyM6931-Mar-09 4:37
professionalDaveyM6931-Mar-09 4:37 
Questionhow can i convert audio sample rate and audio sample size of wave files ?? Pin
ahmedhassan9631-Mar-09 1:26
ahmedhassan9631-Mar-09 1:26 

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.