On Fri, 2 Jun 2006 12:38:02 -0500, "Cindy H" <(E-Mail Removed)> wrote:
¤ Hi
¤
¤ I'm having a problem getting the insert statement correct for an Access
¤ table I'm using.
¤ The Access table uses an autonumber for the primary key.
¤ I have tried this:
¤ INSERT INTO Tournaments (Tournament, MemberName, Score) VALUES (vtournament,
¤ vMemberName, vScore) SELECT ID, Tournament, MemberName, Score FROM
¤ Tournament WHERE (ID = @@IDENTITY);"
¤
¤ This works with a sql server database.
¤
¤ I'm getting this error:
¤
¤ System.Data.OleDb.OleDbException: Missing semicolon (

at end of SQL
¤ statement
¤
¤ Does anyone know how to do this?
See the following:
HOW TO: Retrieve the Identity Value While Inserting Records into Access Database By Using Visual
Basic .NET
http://support.microsoft.com/default...b;en-us;815629
Paul
~~~~
Microsoft MVP (Visual Basic)