• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How do I create HTM documents Using an MS Access DB

Jeff444

Member
Although I am very good with creating Access databases I am having trouble creating HTM's that are Access Driven.
 
Heres the ASP route (Access can output HTML pages, but they are nasty, this is better)

1) set up your access db as a system DSN in control panel
2) enable Personal Web Server if you are on WIn9x or IIS if you are on NT or Win2k
3) Create an ASP page (just like html, except with asp extension)
4)Open a database connection in the ASP page: (use your Access DSN)


<<
<%
Dim ADOConn
Set ADOConn = Server.CreateObject(&quot;Adodb.Connection&quot😉
ADOConn.Open &quot;DSN=MyAccessDSN&quot;
>>


5) create a recordset in the asp page: (use the connection above and any query you want)


<<
<%
Dim rs
Set rs = Server.CreateObject(&quot;Adodb.Recordset&quot😉
rs.Open &quot;Select FirstName, LastName From tblPeople&quot; , ADOConn
>>


6) loop thru the recorset until its at the end, display a line of HTML for each.


<<
While Not rs.EOF
%>
Employee Name : <%=rs(&quot;FirstName&quot😉 &amp; &quot; &quot; &amp; rs(&quot;LastName&quot😉 %> <br>
<%
rs.MoveNext
Wend
%>
>>




http://msdn.microsoft.com - A good place to pick up some easy asp
http://www.aspin.com - a good place for all kinds of ASP stuff
 
Back
Top