Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · ASP.NET Newsletter Application · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ADO/ODBC : Problems adding to 2 tables Signup · Login
Author Thread
Problems adding to 2 tables
Posted in tutorial: Executing All or None queries : ASP Transactions
·  ALiK
User
Joined: 6 May 2003
Total Posts: 2

Problems adding to 2 tables

Posted: 6 May 2003
ive used the code following code from your example of how to use transactions on asp.

It doesnt seem to be working, I entered in some information that should come back with and error only when i have the one insert the error comes up other wise it just processes it leaving me with one table with missing information

please help

Dim con
Set con = Server.CreateObject("ADODB.Connection")

con.Open connStr
Response.Write "Opening Connection...<br><br>"

con.BeginTrans
Response.Write "BeginTrans Called...<br>"



con.Execute("Insert INTO cust_details(cust_id, title, first_name, last_name, address, postcode, telephone, email, country, cardnumber, valid_from, valid_to, issue_no, sec_number, card_name) Values ('"&id&"','" & strTitle & "','" & strFirstName & "','" & strLastname & "','" & strAddress & "','" & strPostCode & "','" & strTelePhone & "','" & strEmail & "', '" & strCountry & "','" & strCardNumber & "','" & strValid_from & "','" & strValid_to & "','" & strIssue_no & "','" & strSec_number & "','" & StrCard_name & "')")
Response.Write "Trying to insert cust_details<br>"


con.Execute("Insert INTO order_info(cust_id, subtotal, delivery, insurance, total, dateo, dispatched) Values ('"& id &"','" & orderTotalc & "','" & strDelivery & "','" & strInsurance & "','" & strTotal & "', '" & dateTime & "','n')")
Response.Write "Trying to insert order_info <br>"
Want to leave a comment? Login or Register for free!

Users Who Have Visited This Thread In Last 24 Hours
2 Visitors

Login to post a comment or start a new thread
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2010 Stardeveloper.com, All Rights Reserved.