Kbase P106242: How to run a Webspeed program from ASP?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
GOAL:
How to run a Webspeed program from ASP?
GOAL:
How to run a Webspeed program using Active Server Pages?
GOAL:
How to pass parameters from ASP to a Webspeed procedure?
GOAL:
How to call a Webspeed procedure using WSASP?
FACT(s) (Environment):
WebSpeed 3.x
FIX:
VBSCRIPT/ASP Code:
vcust = 1
'-- Create our WebSpeed Agent
Set wsobj = Server.CreateObject("WSASP.WSAgent")
'-- Send parameter to Webspeed Procedure via QueryString simulating a GET request
wsobj.QueryString = "vcust=" & vcust
'-- Call our WebSpeed Script
wsobj.RunScript "getname.p"
'-- Store the Webspeed output to vout variable
vout = wsobj.Output
'-- Write vout content to the web
Response.Write vout
Webspeed 4GL Code:
FIND FIRST customer WHERE custnum = get-value("vcust") NO-LOCK NO-ERROR.
IF AVAILABLE(customer) THEN DO:
{&OUT} customer.name SKIP.
END.