need help on asp/html assignment?

Valerie

New member
Looking over the following code, can anyone tell me why in my output there are numerous blank lines between the maroon line border of the header & the start of my table, & why my table header row is not highlighting in yellow? Another version has a couple different tweaks but not all that white space below the header & table, & it is highlighting my table header row in yellow as it should.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sample DEPT Table Display Page #3</title>
</head>

<body>
<h1>Sample DEPT Table Display Page #3</h1>
<h2>By Valerie A. Distel</h2>
<hr style="color:maroon"/>

<table>

<%
'Let's establish a connection object to our Access database ...

dim Conn

SET Conn = Server.CreateObject("ADODB.Connection")

'Declare variables for connection parameters ...
dim strDBVirtualPath, strDBLocation, strConnect
strDBVirtualPath = "\vadistel\fpdb\DEPT-EMP.ORIGINAL.mdb"
strDBLocation = Server.MapPath(strDBVirtualPath)
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBLocation

'Open the connection ...
Conn.Open strConnect
%>

<%
'Let's establish our record set...
dim rs

SET rs = Conn.Execute("Select * from DEPT")

response.write "<Table BORDER=3>"
response.write "<TR>"
response.write "<TH>Department Number</TH>"
response.write "<TH>Name</TH>"
response.write "<TH>Location</TH>"
response.write "</TR>"

'Let's loop through the record set...
do while not rs.eof

'Let's print the current row's information...

response.write "<tr>"

response.write "<td>" & rs("DNO")
response.write "<td>" & rs("DName")
response.write "<td>" & rs("Location")

response.write "</tr>"
response.write "<br>"


'Let's move to the next row...
rs.MoveNext

loop

'Let's close and clean up...
rs.Close
SET rs = nothing

Conn.close
Set Comm = nothing
%>

</table>

</body>

</html>
 
Back
Top