<%@LANGUAGE="JAVASCRIPT"%> <% var userRecSet = Server.CreateObject("ADODB.Recordset"); userRecSet.ActiveConnection = "dsn=user;"; userRecSet.Source = "SELECT * FROM usert"; userRecSet.CursorType = 0; userRecSet.CursorLocation = 2; userRecSet.LockType = 3; userRecSet.Open(); var userRecSet_numRows = 0; %><% var Repeat1__numRows = -1; var Repeat1__index = 0; userRecSet_numRows += Repeat1__numRows; %> 1dream.asp/html JavaScript ASP displaying an Access DB


JavaScript Active Server Page that displays an Access Database

1dream.asp
(save the html file as ASP to see it working )
1dream.html (open and view source to see the JavaScript) user.mdb
The JavaScript was generated using Dreamweaver Ultra Dev.
To see this example working the 1dream.asp and user.mdb files need to be saved in the c:\inetpub\webpub directory and Personal Web Server needs to be running. An OBDC connection needs to be set up to the Access database (user.mdb) with a system data source name of user      
When working the following table should display all the records in the 'UserT' table of the user.mdb file. Each record has four fields, these being Name, Memo, Rank and Skill.



Name   

Memo    

Rank      

Skill

<% while ((Repeat1__numRows-- != 0) && (!userRecSet.EOF)) { %>
<%=(userRecSet.Fields.Item("Name").Value)%> <%=(userRecSet.Fields.Item("Memo").Value)%> <%=(userRecSet.Fields.Item("Rank").Value)%> <%=(userRecSet.Fields.Item("Skill").Value)%>
<% Repeat1__index++; userRecSet.MoveNext();} %>