Click here to Skip to main content
16,005,316 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to get the id of a row that was just inserted Pin
Christian Graus26-Feb-08 18:31
protectorChristian Graus26-Feb-08 18:31 
GeneralRe: How to get the id of a row that was just inserted Pin
Guffa26-Feb-08 23:38
Guffa26-Feb-08 23:38 
AnswerRe: How to get the id of a row that was just inserted Pin
Nilesh Hapse26-Feb-08 18:06
Nilesh Hapse26-Feb-08 18:06 
GeneralRe: How to get the id of a row that was just inserted Pin
AAGTHosting26-Feb-08 18:12
AAGTHosting26-Feb-08 18:12 
GeneralRe: How to get the id of a row that was just inserted Pin
Nilesh Hapse26-Feb-08 18:16
Nilesh Hapse26-Feb-08 18:16 
GeneralRe: How to get the id of a row that was just inserted Pin
Nilesh Hapse26-Feb-08 18:20
Nilesh Hapse26-Feb-08 18:20 
GeneralRe: How to get the id of a row that was just inserted Pin
Christian Graus26-Feb-08 18:31
protectorChristian Graus26-Feb-08 18:31 
GeneralRe: How to get the id of a row that was just inserted Pin
Guffa26-Feb-08 23:57
Guffa26-Feb-08 23:57 
Nilesh Hapse wrote:
If so you can get the max of that ID.


No, never do that. That doesn't work if there are more than one user in the system.

There is an easier and perfectly safe method (posted elsewhere in this thread) to get the last generated id, so there is no reason to use this unsafe method to do it. Code tends to be reused, so unless there is a significantly simpler way of doing something under certain conditions, it's always better to use a way that works under any condition.

Methods like using max() to get the id is especially treacherous, as it seems to work perfectly fine as long as you are testing the system with a low number of users, but in the live system it will cause more and more errors when the load increases.

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: How to get the id of a row that was just inserted Pin
Nilesh Hapse27-Feb-08 0:04
Nilesh Hapse27-Feb-08 0:04 
GeneralRe: How to get the id of a row that was just inserted Pin
Guffa27-Feb-08 0:36
Guffa27-Feb-08 0:36 
GeneralRe: How to get the id of a row that was just inserted Pin
Nilesh Hapse27-Feb-08 2:33
Nilesh Hapse27-Feb-08 2:33 
GeneralUse scope_identity() to get the key Pin
supercat927-Feb-08 8:39
supercat927-Feb-08 8:39 
AnswerRe: How to get the id of a row that was just inserted Pin
Guffa26-Feb-08 23:41
Guffa26-Feb-08 23:41 
Generalmainboard serial number Pin
asifullahkhan26-Feb-08 16:20
asifullahkhan26-Feb-08 16:20 
GeneralRe: mainboard serial number Pin
Christian Graus26-Feb-08 18:32
protectorChristian Graus26-Feb-08 18:32 
GeneralRe: mainboard serial number Pin
Rupesh Kumar Swami26-Feb-08 22:13
Rupesh Kumar Swami26-Feb-08 22:13 
GeneralRe: mainboard serial number Pin
Dave Kreskowiak27-Feb-08 5:27
mveDave Kreskowiak27-Feb-08 5:27 
Answer[Resolved] How to make a child form stay on the top until closed in mdi application (VB.NET 2005)? [modified] Pin
rashadaliarshad26-Feb-08 10:34
rashadaliarshad26-Feb-08 10:34 
GeneralRe: How to make a child form stay on the top until closed in mdi application (VB.NET 2005)? Pin
Christian Graus26-Feb-08 11:27
protectorChristian Graus26-Feb-08 11:27 
GeneralRe: How to make a child form stay on the top until closed in mdi application (VB.NET 2005)? Pin
rashadaliarshad26-Feb-08 12:10
rashadaliarshad26-Feb-08 12:10 
GeneralRe: How to make a child form stay on the top until closed in mdi application (VB.NET 2005)? Pin
Christian Graus26-Feb-08 12:50
protectorChristian Graus26-Feb-08 12:50 
Generalupdate panel positioning Pin
solarthur0126-Feb-08 9:17
solarthur0126-Feb-08 9:17 
GeneralRe: update panel positioning Pin
parth.p26-Feb-08 9:56
parth.p26-Feb-08 9:56 
GeneralRe: update panel positioning Pin
solarthur0126-Feb-08 12:00
solarthur0126-Feb-08 12:00 
GeneralRe: update panel positioning Pin
parth.p26-Feb-08 18:15
parth.p26-Feb-08 18:15 

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.