eNerGiZer0101
IS-IT--Management
G'day,
I'm getting the following message:
"ODBC driver does not support the requested properties"
The error is for the following sub:
Sub GetLastJobId
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 anyone see where the error is?
The connection is ADODB
and
oConn.Open "DSN=TEST"
Can someone please give some valuable info on correcting this problem?
Cheers!
I'm getting the following message:
"ODBC driver does not support the requested properties"
The error is for the following sub:
Sub GetLastJobId
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 anyone see where the error is?
The connection is ADODB
and
oConn.Open "DSN=TEST"
Can someone please give some valuable info on correcting this problem?
Cheers!