|
-
Aug 11th, 2006, 12:35 PM
#1
Thread Starter
Member
[RESOLVED] how to get the autoIncrement field value ?
i'm using .net 2.0 framework, c# language.
i got a table with a column set to be identity (auto increment by 1 every time i enter a row of data)
the details :
rid (int) : the primary key with auto increment 1
inTime(date)
outTime(date)
my insert query : "INSERT INTO [aTable] VALUES ('1984/3/3' , '1984/3/3')"
now..
is it possible, after i insert the data, i directly get a return of the 'rid' which is set to be auto incremented ?
-
Aug 11th, 2006, 12:49 PM
#2
Re: how to get the autoIncrement field value ?
The syntax is VB.Net, but it should be a simple conversion (ADO.Net is really persistent between VB and C#).
http://www.vbforums.com/showthread.php?t=379394
If you need help switching it over or have probs; let me know.
-
Aug 12th, 2006, 01:25 PM
#3
Thread Starter
Member
Re: how to get the autoIncrement field value ?
ouw..
awesome..
thx for da code..
it solve my problem directly
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|