Below is a code snippet that is throwing the following error:
Error Source: Microsoft DTS Package
Error Description: Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: Object required: 'Server'
Error on line 13
In my code line 13 is the following:
Set Cnxn = Server.CreateObject("ADODB.connection")
I did set up a Microsoft OLE DB connection in my DTS package for this
ActiveX Task. I'm new to VBScript and ActiveX. Any help would be
appreciated.
Thanks,
-p
'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************
Function Main()
Main = DTSTaskExecResult_Success
' connection, command and recordset variables
Dim Cnxn, strCnxn
' create and open connection
Set Cnxn = Server.CreateObject("ADODB.connection")
strCnxn = "data source=Pluto;initial catalog=Stats;User Id=sa;password=;"
Cnxn.Open strCnxn
End Function