Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 03-13-2002, 10:01 AM   #1
Member (10 bit)
 
Join Date: May 1999
Location: Orlando, FL
Posts: 975
Send a message via ICQ to artsapimp
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?
artsapimp is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:53 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2