Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script error

Status
Not open for further replies.

eNerGiZer0101

IS-IT--Management
Jul 5, 2004
57
0
0
CA
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!

 
The error is for the following sub
Which line ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top