Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Wed, 12 Apr 2006 09:29:34 GMT,    group: microsoft.public.inetsdk.programming.scripting.vbscript        back       


Invoking a VB script   
I can evoke the asp page  'TestMyScript'  (which
alters data in a database) by 'posting' from
another page using:-

<form name="form1" method="post" action="Test_MyScript.asp">

What I want to do is to run 'TestMyScript'  on
the server and then for processing to end i.e.
with no further response to the client.

?? How can I achieve this ??

[My understanding is that it can be done by MyTestScript being an
'executeable' but from that point on I am gazing into the dark! with a few
flashes of light such as the server must be configured to permit execution
of the script, that one might use 'cgi', . . . ]

--- Code 'TestMyScript.asp' ------
<%
 @ LANGUAGE="VBSCRIPT"
%>
<%
 Option explicit
 response.expires = 0
%>
<!-- #include file = "adovbs.inc" -->
<!-- #include file = "MyInclude.asp" -->
<%
dim cnTest, sql, rsTest
dim f1,f2, NewItem

 f1 = Request("Field1")
 f2 = Request("Field2")
 NewItem = f1 & f2
 Set cn = OpenConnToTest()
 sql = "SELECT * FROM TestTable WHERE TestId = 0 "
 Set rsTest = OpenSqlSet(sql, cn, adOpenDynamic, adLockOptimistic)
 rsTest.AddNew
  rsTest("TestTxt") = NewItem
 rsTest.Update
 rsTest.Close
 set RsTest = nothing

%>
---- END TestMyScript -----
-- 


Jim Bunton
date: Wed, 12 Apr 2006 09:29:34 GMT   author:   Jim Bunton

Re: Invoking a VB script   
Jim Bunton wrote:
> I can evoke the asp page  'TestMyScript'  (which
> alters data in a database) by 'posting' from
> another page using:-
>
> <form name="form1" method="post" action="Test_MyScript.asp">
>
> What I want to do is to run 'TestMyScript'  on
> the server and then for processing to end i.e.
> with no further response to the client.
>
> ?? How can I achieve this ??

I'm not sure I understand. My initial reaction is to tell you to use 
Response.End, but I don't think that is what you want.

Is it simply that you want the calling page reloaded? Then simply do a 
response.write caller.htm.

Or have caller.asp post to itself, and in caller.asp's server-side code, 
check to see if it's being called due to a post (check the request.Form 
collection), and if so, use

Server.Execute Test_MyScript.asp
-- 
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
date: Wed, 12 Apr 2006 07:07:35 -0400   author:   Bob Barrows [MVP] com

Thanks Re: Invoking a VB script   
Hi Bob - thanks for the reply

I think you were right in saying that I wasn't quite sure what I wanted.
1. I have now realsied that actually it doesn't matter if the script 'send a
page back' to the client.
2. and that I was being bamboosled by a lod of eg'd written in Perl and a
number of other languages that for me at this point are difficult to follow
in the way I can VB. I thought these eg's were doing more than they really
were

Yes - I tried response.end & response.clear in my perambulations!

Any way thanks again for taking he trouble to respond

Jim

"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:O3jFPFiXGHA.3684@TK2MSFTNGP05.phx.gbl...
> Jim Bunton wrote:
> > I can evoke the asp page  'TestMyScript'  (which
> > alters data in a database) by 'posting' from
> > another page using:-
> >
> > <form name="form1" method="post" action="Test_MyScript.asp">
> >
> > What I want to do is to run 'TestMyScript'  on
> > the server and then for processing to end i.e.
> > with no further response to the client.
> >
> > ?? How can I achieve this ??
>
> I'm not sure I understand. My initial reaction is to tell you to use
> Response.End, but I don't think that is what you want.
>
> Is it simply that you want the calling page reloaded? Then simply do a
> response.write caller.htm.
>
> Or have caller.asp post to itself, and in caller.asp's server-side code,
> check to see if it's being called due to a post (check the request.Form
> collection), and if so, use
>
> Server.Execute Test_MyScript.asp
> -- 
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
date: Thu, 13 Apr 2006 14:23:20 GMT   author:   Jim Bunton

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us