|
| Author |
Message |
Paulo
Joined: 04 Oct 2007 Posts: 24
|
Posted: Tue Feb 26, 2008 4:52 pm Post subject: Executing page |
|
|
I need to execute some aspx page on the server everyday at 10PM.
Should I do a VB6 exe with browser component wich opens the url and after
executing closes itself?
The server should be scheduled to run this program every day... What do you
think ?
Archived from group: microsoft>public>vb>general>discussion |
|
| Back to top |
|
 |
Paulo
Joined: 04 Oct 2007 Posts: 24
|
Posted: Tue Feb 26, 2008 4:59 pm Post subject: Re: Executing page |
|
|
but how can I know if the page was executed succesfully? and after closing
the program...
"Paulo" escreveu na mensagem @TK2MSFTNGP05.phx.gbl...
>I need to execute some aspx page on the server everyday at 10PM.
>
> Should I do a VB6 exe with browser component wich opens the url and after
> executing closes itself?
>
> The server should be scheduled to run this program every day... What do
> you think ?
>
> |
|
| Back to top |
|
 |
Stefan Berglund
Joined: 04 Oct 2007 Posts: 636
|
Posted: Tue Feb 26, 2008 2:51 pm Post subject: Re: Executing page |
|
|
On Tue, 26 Feb 2008 11:59:07 -0300, "Paulo" wrote:
in
>but how can I know if the page was executed succesfully? and after closing
>the program...
>
>"Paulo" escreveu na mensagem
>@TK2MSFTNGP05.phx.gbl...
>>I need to execute some aspx page on the server everyday at 10PM.
>>
>> Should I do a VB6 exe with browser component wich opens the url and after
>> executing closes itself?
There are several ways you could do this. One way would be to use a
recordset object to open the page and have the page return the status in
the response object.
---
Stefan Berglund |
|
| Back to top |
|
 |
Paulo
Joined: 04 Oct 2007 Posts: 24
|
Posted: Tue Feb 26, 2008 9:33 pm Post subject: Re: Executing page |
|
|
So, show me how! Please!
"Stefan Berglund" escreveu na mensagem @4ax.com...
> On Tue, 26 Feb 2008 11:59:07 -0300, "Paulo" wrote:
> in
>
>>but how can I know if the page was executed succesfully? and after closing
>>the program...
>>
>>"Paulo" escreveu na mensagem
>>@TK2MSFTNGP05.phx.gbl...
>>>I need to execute some aspx page on the server everyday at 10PM.
>>>
>>> Should I do a VB6 exe with browser component wich opens the url and
>>> after
>>> executing closes itself?
>
> There are several ways you could do this. One way would be to use a
> recordset object to open the page and have the page return the status in
> the response object.
>
> ---
> Stefan Berglund |
|
| Back to top |
|
 |
Bob Butler
Joined: 04 Oct 2007 Posts: 1081
|
Posted: Tue Feb 26, 2008 4:45 pm Post subject: Re: Executing page |
|
|
"Paulo" wrote in message @TK2MSFTNGP05.phx.gbl...
>I need to execute some aspx page on the server everyday at 10PM.
>
> Should I do a VB6 exe with browser component wich opens the url and after
> executing closes itself?
>
> The server should be scheduled to run this program every day... What do
> you think ?
My first thought would be to take the code that needs to be executed and put
it into some component that can be called from the web page as well as from
a scheduled task. It seems awkward to run something to connect to the web
server to run the code when you could just run the code.... |
|
| Back to top |
|
 |
Stefan Berglund
Joined: 04 Oct 2007 Posts: 636
|
Posted: Tue Feb 26, 2008 6:09 pm Post subject: Re: Executing page |
|
|
On Tue, 26 Feb 2008 11:52:21 -0300, "Paulo" wrote:
in
>I need to execute some aspx page on the server everyday at 10PM.
>
>Should I do a VB6 exe with browser component wich opens the url and after
>executing closes itself?
>
>The server should be scheduled to run this program every day... What do you
>think ?
>
As Bob pointed out this may not be the ideal way to what you're doing
but since you didn't tell us what it is you want to do...
In this example the VB app could run on any desktop and you would
schedule it to run everyday at 10PM. The ASP will perform whatever
function you wish and then return the status.
The VB app would look like this:
Private Sub Command1_Click()
On Error Resume Next
Dim rs As ADODB.Recordset: Set rs = New ADODB.Recordset
rs.Open "http://stefs-server2/blahblahblah/test1.asp"
If (Err.Number 0) Then
Debug.Print Err.Description
Err.Clear
Else
Debug.Print "datum="; rs.Fields("Some_Name").Value
End If
End Sub
The ASP should contain no HTML and should not output anything to the
Response object other than the contents of the recordset with whatever
values you want. The example shows a VarChar field of length 64.
<%Option Explicit
Dim rs: Set rs = CreateObject("ADODB.Recordset")
With rs
.Fields.Append "Some_Name", 200, 64
.Open
.AddNew
.Fields("Some_Name").Value = "woo hoo - we're cookin with gas!"
.Save Response
.Close
End With%>
---
Stefan Berglund
|
|
| Back to top |
|
 |
|