03-13-2002, 10:01 AM
|
#1
|
|
Member (10 bit)
Join Date: May 1999
Location: Orlando, FL
Posts: 975
|
ASP & INSERT statements
Instead of using rst.AddNew.... I would like to use an INSERT statement to add records into an access database. I have the INSERT statement working on SQL server but am having problems with Access 2000. Here's what I have...
PHP Code:
strSQL = "SET NOCOUNT ON; " & _
"INSERT INTO [MainTable] " & _
"(" & _
... Fields go here...
"); " & _
"SELECT @@IDENTITY AS RecordID;"
Like I said earlier it works fine with SQL server but generates an error with Access 2000. The error is referring to SELECT @@IDENTITY AS RecordID. Is there a way to get the RecordID if doing this type of INSERT statement and using Access?
|
|
|