Discussion Locked

ASP showing MSAccess 97 forms

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have an employee "In/Out board" dB. I wish to call/show frmIn_Out via an ASP page. "I Know Nut-ing" about ASP. Suggestions? Please? WHat should one watch out for? What are pitfalls?

3 replies

by andrew

ASP is simply a server-side scripting engine. Ultimately, ASP pages generate HTML and send it back to the browser.

You won't be able to directly use the forms in ASP. What I recommend you do, is write a simple ASP page that reads from the Access data, and generates a simple HTML page.

Here is the entire ASP page code:

<%@ Language=VBScript %>
<%Option Explicit%>

<%
Dim sDSN
Dim oCon
DimoRS

on error resume next
sDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db1.mdb;"
Set oCon = Server.CreateObject("ADODB.Connection")
Set oRS = Server.CreateObject("ADODB.Recordset")

oCon.Open sDSN
oRS.Open "SELECT * FROM Table1", oCon
Do
Response.Write oRS.Fields("Name").Value & " " & oRS.Fields("Status").Value & "
"
oRS.MoveNext
Loop until oRS.EOF
%>

It gets a recordset, loops through it and writes an HTML line for each person and the In/Out status.

I'll email you the sample Db I used for this.

This discussion is closed to new replies.