run a VBSript on Win98 task scheduler 
Author Message
 run a VBSript on Win98 task scheduler

I run a VBScript on  the win98 task scheduler. It gave a error message
like this:
Line: 20
char: 1
Error: Object required: "Server"
Code: 800A01A8
Source: Microsoft VBScript runtime error

My code in line 20 & 21 are:
Set strConnect = Server.CreateObject("ADODB.Connection")
strconnect.open "DSN=ppsWEB"

Thanks in advance.

Y.H. Duan



Tue, 26 Nov 2002 03:00:00 GMT  
 run a VBSript on Win98 task scheduler
I beleive the Server object is only available in ASP.

Try

Set strConnect = CreateObject("ADODB.Connection")
strconnect.open "DSN=ppsWEB"


Quote:
> I run a VBScript on  the win98 task scheduler. It gave a error message
> like this:
> Line: 20
> char: 1
> Error: Object required: "Server"
> Code: 800A01A8
> Source: Microsoft VBScript runtime error

> My code in line 20 & 21 are:
> Set strConnect = Server.CreateObject("ADODB.Connection")
> strconnect.open "DSN=ppsWEB"

> Thanks in advance.

> Y.H. Duan



Tue, 26 Nov 2002 03:00:00 GMT  
 run a VBSript on Win98 task scheduler
Bill:
Thanks.
Another question is:
Can I use the following code in vbscript?

  strSQL="SELECT * FROM ops "
 'set up rst
  Set rst=createobject("ADODB.RECORDSET")
  rst.open strSQL, _
    strConnect, ado_OpenKeyset, ado_LockOptimistic

It gives me the error message:" ADO could not find the object in the
collection corresponding to the name  or oridinal reference requested by the
application".

Thanks again.

Y.H. Duan



Tue, 26 Nov 2002 03:00:00 GMT  
 run a VBSript on Win98 task scheduler

Done



Tue, 26 Nov 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Scripting the Windows Task Scheduler in Win98

2. How to pause task scheduler in win98

3. Pause the Win98 Task scheduler with VB

4. Unable to run script via W2K Terminal Services Task Scheduler

5. How can I change which account the Task Scheduler service runs as under nT

6. script run on task scheduler?

7. W2k Task-Scheduler -> find hanging tasks

8. Setting Username and Passwords for a scheduled task in MS Task Scheduler

9. Setting Username and Passwords for a scheduled task in MS Task Scheduler

10. Submit a task to the Task Scheduler

11. Task Scheduler running on NT

 

 
Powered by phpBB® Forum Software