|
-
Dec 9th, 2008, 12:09 PM
#1
[RESOLVED] Retrieving the autogenerated key while doing an INSERT?
Hey there. I've currently got this SQL statement:
INSERT INTO Inlagg (rubrik, anvandare, inlaggText) VALUES ('" + rubrik +"', '" + anvandare.getAnvandarnamn() + "', '" + inlaggText + "')"
I've set it up to autogenerate a key when a row is inserted into the table. My problem now is that I need to use this key immediately after inserting the row, is there any way to insert the row and retrieve the autogenerated key in one go?
Im using Java (So I guess its ...JDBC?) and an Access 2002 database.
Help would be much appreciated. Thanks.
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
|