Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
ASP General
Double Insert :: best route?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Ray at, post: 4331899"] Since Access does not support multiple queries in one command, this is pretty much what you'll have to do. I personally would build to SQL strings separately and execute them right in succession, i.e. sSQL = "INSERT INTO tblCustomer (email_address, first_name, last_name) VALUES(" sSQL=sSQL & "'" & email_address & "', " sSQL=sSQL & "'" & first_name & "', " sSQL=sSQL & "'" & last_name & "', " sSQLAudit = Replace(sSQL, "tblCustomer", "auditCustomer") Set cnn = CreateObject("ADODB.Connection") strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../database/listings.mdb") '//This one is for Access 2000/2002 cnn.Open(strCon) cnn.Execute sSQL cnn.Execute sSQLAudit cnn.Close Set cnn = Nothing '''Note that if your SQL contains "tblCustomer" in the actual data, it'll get replaced there as well, so perhaps you'll want to build the strings a little differently. Ray at home [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
ASP General
Double Insert :: best route?
Top