
October 24th, 2003, 10:04 AM
|
|
Junior Member
|
|
Join Date: Oct 2003
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
VBScript in XSL, trying to execute SQL connect.
I'm trying to modify a XSL file so it will execute a SQL Query against our SQL 2000 server. I've included the code below. I'm not sure if it is right but I am guessing it is not. The 2nd messagebox never executes. If I comment out the "oADOConn.Open Connect" line and the ".Close" line then the 2nd messagebox displays. Can anyone help me with this. I've tried a number of methods to connect to a SQL server from with in XSL to no avail. Any assistance would be greatly appreciated.
John.
<SCRIPT LANGUAGE="VBScript">
Dim Connect
Connect = "Provider=SQLOLEDB;"
Connect = Connect + "Initial Catalog=dpenterprise4;"
Connect = Connect + "Data Source = 10.0.0.1;"
Connect = Connect + "User ID=sa;"
Connect = Connect + "Password=g0pav*U;"
msgbox Connect
Dim oADOConn
Set oADOConn = CreateObject("ADODB.Connection")
oADOConn.Open Connect
oADOconn.Close
set oADOConn=Nothing
MsgBox "End"
</SCRIPT>
|