Aoami
I am a FH squatter
- Joined
- Dec 22, 2003
- Messages
- 11,223
Why this no work?
Access database called Roster.accdb, table inside the database called Roster, and this .ASP file, all in the same folder. I want the marked fields (Number, FirstName, LastName) to appear in a table in the roster div. I get an empty 1 column 1 row table.
?
Thanks.
Code:
<div id="roster"> <!--roster div-->
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.ACE.OLEDB.12.0"
conn.Open "Roster.accdb"
rs.Open "SELECT Number, FirstName, LastName FROM Roster", conn
%>
<table border="1" width="100%">
<tr>
<%for each x in rs.Fields
response.write("<th>" & x.name & "</th>")
next%>
</tr>
<%do until rs.EOF%>
<tr>
<%for each x in rs.Fields%>
<td><%Response.Write(x.value)%></td>
<%next
rs.MoveNext%>
</tr>
<%loop
rs.close
conn.close
%>
</table>
</div> <!--end roster div-->
Access database called Roster.accdb, table inside the database called Roster, and this .ASP file, all in the same folder. I want the marked fields (Number, FirstName, LastName) to appear in a table in the roster div. I get an empty 1 column 1 row table.
?
Thanks.