Script is not running in opmanager

Script is not running in opmanager

Hi Team,


i wrote a VB Script to connect the database and fetch the values from there . the problem is when i execute the script from my desktop it works fine and no errors but if i execute the script in opmanager  im getting error like this

Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. asfd C:\MANAGE~1\OPMANA~1\temp\OpManager_317_1379676097149.vbs(26, 1) ADODB.Connection: Provider is not specified and there is no designated default provider.


SCRIPT:
Dim Connection Dim ConnString Dim Recordset Dim SQL Dim time1 Dim time2 '7 'define the connection string, specify database driver ConnString="DRIVER={SQL Server};SERVER=10.0.*.*;UID=*****;" & _ "PWD=*****;DATABASE=Analysis" '11 'declare the SQL statement that will query the database SQL1 = "SELECT F2 FROM Analysis.dbo.sheet1 where F1=16" SQL2 = "SELECT F2 FROM Analysis.dbo.sheet1 where F1=32" '15 'create an instance of the ADO connection and recordset objects Set Connection = CreateObject("ADODB.Connection") Set Recordset1 = CreateObject("ADODB.Recordset") Set Recordset2 = CreateObject("ADODB.Recordset") Set Recordset3 = CreateObject("ADODB.Recordset") '21 'Open the connection to the database Connection.Open ConnString '26 'Open the recordset object executing the SQL statement and return records Recordset1.Open SQL1,Connection Recordset2.Open SQL2,Connection '30 Set time1 = Recordset1.Fields(0) Set time2 = Recordset2.Fields(0) t2= CDate(time1) t3= Cdate(time2) '38 'SQL3 = "SELECT Datediff(MILLISECOND, 'SELECT F2 FROM Analysis.dbo.sheet1 where F1=16', 'SELECT F2 FROM Analysis.dbo.sheet1 where F1=32')" 'Recordset3.Open SQL3,Connection t4 = DateDiff("s",t2,t3) Wscript.Echo t2 Wscript.Echo t3 Wscript.Echo t4 'msgbox Recordset3.Fields(0) 'close the connection and recordset objects to free up resources Recordset1.Close Set Recordset1=nothing Connection.Close Set Connection=nothing MsgBox "End of program"


PLEASE REPLY ON THIS ,Thanks in advance

Regards,
Srikanth 

                New to ADSelfService Plus?