brianh
Feb 7th, 2001, 10:16 AM
I am very new at ASP, I have somwhat fo a VB background. I want to simply display data in tables. Here is my code, how do I do this?
(This code breaks right now as you will see)
****************************************
<% @Language = VBScript %>
<%
Option Explicit
Dim objConn, objRs, strQ, strOut
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Reg4web\SYS\Novonyx\suitespot\docs\n44web\dbTest.mdb"
set objRs = Server.CreateObject("ADODB.Recordset")
strQ = "Select * from tblCheck"
objRs.Open strQ, objConn
%>
<html>
<body>
<table border="1">
<tr>
<%
While not objRs.EOF
& "<tr>" & Response.Write objRs("Name") & ">>"
objRs.Movenext
Wend
</td>
While not objRs.EOF
Response.Write objRs("In") & ">>"
objRs.Movenext
Wend
</td>
<td>
While not objRs.EOF
Response.Write objRs("Time") & ">>"
objRs.Movenext
Wend
objrs.close
objconn.close
set objRs = Nothing
set objConn = Nothing
%>
</tr>
</table>
</body>
</html>
****************************************
(This code breaks right now as you will see)
****************************************
<% @Language = VBScript %>
<%
Option Explicit
Dim objConn, objRs, strQ, strOut
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Reg4web\SYS\Novonyx\suitespot\docs\n44web\dbTest.mdb"
set objRs = Server.CreateObject("ADODB.Recordset")
strQ = "Select * from tblCheck"
objRs.Open strQ, objConn
%>
<html>
<body>
<table border="1">
<tr>
<%
While not objRs.EOF
& "<tr>" & Response.Write objRs("Name") & ">>"
objRs.Movenext
Wend
</td>
While not objRs.EOF
Response.Write objRs("In") & ">>"
objRs.Movenext
Wend
</td>
<td>
While not objRs.EOF
Response.Write objRs("Time") & ">>"
objRs.Movenext
Wend
objrs.close
objconn.close
set objRs = Nothing
set objConn = Nothing
%>
</tr>
</table>
</body>
</html>
****************************************