I didn't really debug this code, but if you change the names
to match your ASP page (change Sample.asp to your page)
and the database (change MyDb.mdb to your database), then
this should work. If not, it will definitely get you started.
Good luck
<%@ Language=VBScript %>
<% Option Explicit %>
<HTML>
<%
Dim objCnn, sPath sConn, objRst, sSQL
sPath = LCase(Server.MapPath("Sample.asp"))
sPath = Replace(sPath,"Sample.asp","MyDB.mdb")
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
"Persist Security Info=False;Data Source=" _
& sPath
' Create an ADO database connection
Set objCnn = server.createobject("adodb.connection")
objCnn.open(sConn)
' Create ADO Recordset and load sql statement
Set objRst = server.CreateObject("adodb.recordset")
sSQL = "SELECT * FROM tblExample ORDER BY MyField"
Set objRst = objCnn.Execute(sSQL)
If objRst.BOF And objRst.EOF Then
%>
<table><tr><td>No Records To Display</td></tr></table>
<%
Else
%>
<table>
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
<%
Do Until objRst.EOF
%>
<tr>
<td><%=objRst.Fields(0)%></td>
<td><%=objRst.Fields(0)%></td>
</tr>
<%
objRst.MoveNext
Loop
%>
</table>
<%
Set objRst = Nothing
Set objCnn = Nothing
End If
%>
</HTML>
--
Danny J. Lesandrini
dl*********@hotmail.com http://amazecreations.com
<ph*******@miltonsoffice.com> wrote in message
news:d1**************************@posting.google.c om...
Hi,
I have a searchable databse in Access that I would like to convert
into a simple website. Can anyone point me in the right direction?