I'm relatively new to vbscript. What's harder is that it's been a while since using ADO. I'm a little rusty, and I'm having trouble finding what I'm looking for on Google. As always, I post here in those situations.
Basically, I'm looking to use a SQL Transaction and execute a string update query which is passed in to this routine.
In the code below, the variable named theSQL is an update query that has been tested and works correctly.
What are the problems in this syntax/logic?
Thanks.
Kate
[small]"The Distorted View"
-the only podcast that's fresh perked
www.distortedview.com[/small]
Basically, I'm looking to use a SQL Transaction and execute a string update query which is passed in to this routine.
In the code below, the variable named theSQL is an update query that has been tested and works correctly.
What are the problems in this syntax/logic?
Code:
Dim adoConn
Set adoConn = CreateObject("ADODB.Connection")
adoConn.Open application("DSN")
Dim adoCmd
Set adoCmd = CreateObject("ADODB.Command")
Set adoCmd.ActiveConnection = adoConn
adoConn.BeginTrans
adoCmd.CommandText = theSQL;
adoCmd.Execute
adoConn.CommitTrans
Thanks.
Kate
[small]"The Distorted View"
-the only podcast that's fresh perked
www.distortedview.com[/small]