|
|
|
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
|
|