Click here to Skip to main content
15,887,945 members
Home / Discussions / C#
   

C#

 
QuestionSelect Row Pin
Rmokkenstorm14-Jun-06 21:22
Rmokkenstorm14-Jun-06 21:22 
AnswerRe: Select Row Pin
albCode14-Jun-06 22:07
albCode14-Jun-06 22:07 
GeneralRe: Select Row Pin
Rmokkenstorm14-Jun-06 23:47
Rmokkenstorm14-Jun-06 23:47 
GeneralRe: Select Row Pin
albCode14-Jun-06 23:57
albCode14-Jun-06 23:57 
GeneralRe: Select Row Pin
Rmokkenstorm15-Jun-06 0:31
Rmokkenstorm15-Jun-06 0:31 
GeneralRe: Select Row Pin
Rmokkenstorm15-Jun-06 0:39
Rmokkenstorm15-Jun-06 0:39 
QuestionRe the last id value Pin
Tamimi - Code14-Jun-06 20:15
Tamimi - Code14-Jun-06 20:15 
AnswerRe: Re the last id value Pin
Guffa14-Jun-06 20:47
Guffa14-Jun-06 20:47 
Getting the largest id is not a safe way to get the id of the record. If another user added a record at the same time, you will get the wrong id. Consider this scenario:

:: User 1 adds a record, which gets id 42.
:: User 2 adds a record, which gets id 43.
:: User 1 gets the highest id, which is 43.
:: User 2 gets the highest id, which is 43.

Now both users think that they added the record with id 43.

Using @@identity on the other hand is completely safe. A user will always get the last id that was created in the database session, e.g. with the same database connection.


---
b { font-weight: normal; }

GeneralRe: Re the last id value Pin
Tamimi - Code14-Jun-06 21:03
Tamimi - Code14-Jun-06 21:03 
GeneralRe: Re the last id value Pin
J4amieC14-Jun-06 22:07
J4amieC14-Jun-06 22:07 
AnswerRe: Re the last id value Pin
Guffa15-Jun-06 1:12
Guffa15-Jun-06 1:12 
QuestionScreenSaver Pin
picasso214-Jun-06 19:35
picasso214-Jun-06 19:35 
Questiondatabindings...combobox Pin
rzvme14-Jun-06 19:19
rzvme14-Jun-06 19:19 
AnswerRe: databindings...combobox Pin
rah_sin14-Jun-06 19:25
professionalrah_sin14-Jun-06 19:25 
GeneralRe: databindings...combobox Pin
rzvme14-Jun-06 19:57
rzvme14-Jun-06 19:57 
GeneralRe: databindings...combobox Pin
rah_sin14-Jun-06 20:08
professionalrah_sin14-Jun-06 20:08 
GeneralRe: databindings...combobox Pin
rzvme15-Jun-06 6:08
rzvme15-Jun-06 6:08 
QuestionC# MySQL connectivity [modified] Pin
phil chris14-Jun-06 18:49
phil chris14-Jun-06 18:49 
AnswerRe: C# MySQL connectivity Pin
rah_sin14-Jun-06 18:56
professionalrah_sin14-Jun-06 18:56 
AnswerRe: C# MySQL connectivity Pin
Daniele Ferrero14-Jun-06 20:23
Daniele Ferrero14-Jun-06 20:23 
GeneralRe: C# MySQL connectivity Pin
phil chris14-Jun-06 20:55
phil chris14-Jun-06 20:55 
QuestionPixel Width of a string Pin
reshsilk14-Jun-06 17:39
reshsilk14-Jun-06 17:39 
AnswerRe: Pixel Width of a string Pin
Mike Poz14-Jun-06 18:33
Mike Poz14-Jun-06 18:33 
QuestionHow to program Finger Scanner?? Pin
Claton14-Jun-06 16:44
Claton14-Jun-06 16:44 
AnswerRe: How to program Finger Scanner?? Pin
Judah Gabriel Himango14-Jun-06 16:48
sponsorJudah Gabriel Himango14-Jun-06 16:48 

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.