Calling HyperACCESS from an ASP web page

Calling HyperACCESS from an ASP web page.

You can get HAWin32 working properly under active server pages by following the code sample below. This code creates a page with a button on it that will launch HAWin32 when clicked:

Sample Code:

<title>HAWin32 Active Server Page Test</title>
<body bgcolor=”#000000″ text=”#FFFFFF”>
<h2 align=”left”><font color=”#0000FF”>HyperACCESS Active Server Page Test Page</font></h2>
<% if Request.Form(“FormProcessed”) <> 1 then %>
<p align=”left”>This page test HAWin32’s ability to be run from an Active Server Page.</p>
<form method=”POST” action=”h32test.asp” name=”PingInfo”>
<input type=”hidden” name=”FormProcessed” value=”1″><p><input
type=”submit” value=”Start HAWin32″ name=”B1″></p>
<p>Copyright c 1999 Hilgraeve Inc.</p>
Set haAuto = Server.CreateObject(“HAWin32”)

Set haScript = haAuto.haInitialize(“ASPTest”)

retval = haScript.haSetDisplay(1)

if retval = 0 Then
Response.Write “<pre>HAWin32 Test Passed</pre>”

Response.Write “<pre>HAWin32 Test Failed – Retval=” + CStr(retval) + “</pre>”
End If
Set haAuto = nothing
Set haScript = nothing
End If

End of sample code: