These 2 Queries will be used to transfer items from the 'Cart' Database table to the 'Orders' table.
Im using 'BeginTrans' and 'CommitTrans', so that when items are copied to 'Orders' table, they will also be deleted from Cart 'table'.
The transaction prevents one step from happening without the other..... Im Getting this error message:
Microsoft VBScript runtime error '800a01a8' Object required: 'Provider=Microsoft.J' <%
' Begin A Transaction
MM_conn_STRING.BeginTrans ' Transfer cart to orders table
sqlString = "INSERT INTO Orders (" &_
"order_id, " &_
"order_productID, " &_
"order_quantity, " &_
"order_userID, " &_
"order_entrydate, " &_
"order_status " &_
") SELECT " &_
"cart_id, " &_
"cart_productID, " &_
"cart_quantity, " &_
"cart_userID, " &_
"NOW(), " &_
"0 " &_
"FROM Cart WHERE " &_
"cart_userID =" & userID
SET RS = Server.CreateObject( "ADODB.Recordset" )
RS.ActiveConnection = MM_Conn_STRING
RS.Open sqlString
' Empty shopping cart
sqlString = "DELETE FROM Cart " &_
"WHERE cart_userID=" & userID
SET RS = Server.CreateObject( "ADODB.Recordset" )
RS.ActiveConnection = MM_Conn_STRING
RS.Open sqlString
' End the transaction
MM_conn_STRING.CommitTrans
%>
All Help is Appreciated, Thanks