eNerGiZer0101
IS-IT--Management
I'm getting a message error for my script. can someone please help me out. the error is for the following line:
ODBC Driver does not support the requested driver.
Sqltxt = ("SELECT MasterServer, Max(JobId) AS MaxJobId FROM Jobs GROUP BY MasterServer ORDER BY MasterServer")
It is for the following sub:
Sqltxt = ("SELECT MasterServer, Max(JobId) AS MaxJobId FROM Jobs GROUP BY MasterServer ORDER BY MasterServer")
' Wscript.Echo sqltxt
oRS.Open SqlTxt , oConn
If oRS.RecordCount > 0 then
oRS.MoveFirst
t = 1
Do While Not oRS.EOF
MaxJobId(t,1) = oRS("MasterServer")
MaxJobId(t,2) = oRS("MaxJobId")
t = t + 1
oRS.MoveNext
Loop
Else
oRS.Close
oRS.Open ("Select ServerName from MasterServers where Master = 1 Order by ServerName;"),oConn
oRS.MoveFirst
t = 1
Do While Not oRS.EOF
MaxJobId(t,1) = oRS("ServerName")
MaxJobId(t,2) = 0
t = t + 1
oRS.MoveNext
Loop
End If
oRS.Close
End Sub
Can someone please guide to solving this problem.
Cheers.
ODBC Driver does not support the requested driver.
Sqltxt = ("SELECT MasterServer, Max(JobId) AS MaxJobId FROM Jobs GROUP BY MasterServer ORDER BY MasterServer")
It is for the following sub:
Sqltxt = ("SELECT MasterServer, Max(JobId) AS MaxJobId FROM Jobs GROUP BY MasterServer ORDER BY MasterServer")
' Wscript.Echo sqltxt
oRS.Open SqlTxt , oConn
If oRS.RecordCount > 0 then
oRS.MoveFirst
t = 1
Do While Not oRS.EOF
MaxJobId(t,1) = oRS("MasterServer")
MaxJobId(t,2) = oRS("MaxJobId")
t = t + 1
oRS.MoveNext
Loop
Else
oRS.Close
oRS.Open ("Select ServerName from MasterServers where Master = 1 Order by ServerName;"),oConn
oRS.MoveFirst
t = 1
Do While Not oRS.EOF
MaxJobId(t,1) = oRS("ServerName")
MaxJobId(t,2) = 0
t = t + 1
oRS.MoveNext
Loop
End If
oRS.Close
End Sub
Can someone please guide to solving this problem.
Cheers.