Click here to Skip to main content
15,925,723 members
Home / Discussions / C#
   

C#

 
QuestionHow to display drivers in combobox? Pin
cshong13-May-06 18:53
cshong13-May-06 18:53 
QuestionUSB PNP Pin
rudy.net13-May-06 14:24
rudy.net13-May-06 14:24 
AnswerRe: USB PNP Pin
rudy.net13-May-06 16:10
rudy.net13-May-06 16:10 
QuestionIComparable interface *2 Pin
eggie513-May-06 14:23
eggie513-May-06 14:23 
AnswerRe: IComparable interface *2 Pin
led mike13-May-06 17:05
led mike13-May-06 17:05 
AnswerRe: IComparable interface *2 Pin
Josh Smith13-May-06 17:44
Josh Smith13-May-06 17:44 
Question[Access database] how to get the last row inserted? Pin
Susuko13-May-06 12:55
Susuko13-May-06 12:55 
AnswerRe: [Access database] how to get the last row inserted? Pin
NaNg1524113-May-06 17:52
NaNg1524113-May-06 17:52 
Although this is a question to database forum (if there is), I know a little about it so I'll help...

I personally work with database that doesn't stop to work (there are always a few people that can use the database), you should always take that risk! because if some-one inserts a row while you insert a row, you can both edit the same row in the end.

I'll show you the command line for the last inserted row, and then I'm going to show you the better way.
So this is command to get the last row:
Select Top 1 * From tblTable Order By <id-field> DESC
(ofcourse no case-sensetive in here) tblTable = the table
ID-Field = the ID or some other field that increases by time (eg. Date\Time)

Now this is not good because if two people add a row, at the same time, they will, in the end see the same row, the last row inserted, and not their own.
The better way which I prefer is to save the variables from the insert command, and just do a "Where" statement in the select command.
eg: Select * from tblTable Where <field1> = '{0}' And <field2> = '{1}' etc. etc...

Hope I helped... NaNg
AnswerRe: [Access database] how to get the last row inserted? Pin
mav.northwind14-May-06 1:09
mav.northwind14-May-06 1:09 
QuestionPreferred WPF Dev Tools Pin
Josh Smith13-May-06 12:40
Josh Smith13-May-06 12:40 
AnswerRe: Preferred WPF Dev Tools Pin
Rei Miyasaka14-May-06 15:48
Rei Miyasaka14-May-06 15:48 
GeneralRe: Preferred WPF Dev Tools Pin
Josh Smith15-May-06 3:55
Josh Smith15-May-06 3:55 
QuestionDelegates and events Pin
rcwoods13-May-06 9:11
rcwoods13-May-06 9:11 
AnswerRe: Delegates and events Pin
Guffa13-May-06 9:22
Guffa13-May-06 9:22 
GeneralRe: Delegates and events Pin
rcwoods13-May-06 10:16
rcwoods13-May-06 10:16 
QuestionFTP delete folders with all subfolders and containing files Pin
black_raven_in_black_sky13-May-06 8:35
black_raven_in_black_sky13-May-06 8:35 
AnswerRe: FTP delete folders with all subfolders and containing files Pin
simplexe14-May-06 1:14
simplexe14-May-06 1:14 
GeneralRe: FTP delete folders with all subfolders and containing files Pin
black_raven_in_black_sky14-May-06 5:49
black_raven_in_black_sky14-May-06 5:49 
GeneralRe: FTP delete folders with all subfolders and containing files Pin
simplexe14-May-06 19:24
simplexe14-May-06 19:24 
GeneralRe: FTP delete folders with all subfolders and containing files Pin
black_raven_in_black_sky16-May-06 3:08
black_raven_in_black_sky16-May-06 3:08 
GeneralRe: FTP delete folders with all subfolders and containing files Pin
simplexe17-May-06 2:27
simplexe17-May-06 2:27 
Questionhow drawing over calendar ? Pin
Susuko13-May-06 7:40
Susuko13-May-06 7:40 
AnswerRe: how drawing over calendar ? Pin
NaNg1524113-May-06 7:42
NaNg1524113-May-06 7:42 
Questionhow to display sub items in datagridview 2.0 Pin
J.Bhargavi13-May-06 4:28
J.Bhargavi13-May-06 4:28 
AnswerRe: how to display sub items in datagridview 2.0 Pin
Ravi Bhavnani13-May-06 5:06
professionalRavi Bhavnani13-May-06 5:06 

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.