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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

G'Day to all

Status
Not open for further replies.

eNerGiZer0101

IS-IT--Management
Jul 5, 2004
57
CA
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.
 
How and where is oConn instantiated ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
It is instantiated with ADODB.

Set oConn = CreateObject("ADODB.Connection")
oConn.Open "DSN=ServerName"
Set oRS = CreateObject("ADODB.RecordSet")
oRS.CursorType = 1 'AdOpenKeyset... Gave the good Record Count

Can someone please help me out.

is this good
 
oConn.Open "DSN=ServerName"
Are you sure this declaration suffice ?
This may be of interest:

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