|
This is my code:
<html> <head> <title>Spelers</title> <% dbq = Server.MapPath("/dbase/stats.mdb") Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);" _ & "DBQ=" & dbq %> </head> <body> <table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#FFFFCC"> <tr> <td width="100%"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%"><b>Doelpunten: </b><% SQL = "SELECT Doelpunten, ID" _ & " FROM Topscorer WHERE ID=6" ' and we get our recordset! Set RS = Conn.Execute( SQL ) If RS.EOF Then Response.Write "0" Response.End End If
%> <% Response.Write _ "" & RS("Doelpunten") & "" & _ %> </td> </tr> <tr> <td width="100%"><b>Kaarten:</b> </td> </tr> <tr> <td width="100%"><% SQL = "SELECT Naam, Kaart, Wedstrijd, Datum" _ & " FROM Kaartenlast WHERE ID=6" ' and we get our recordset! Set RS = Conn.Execute( SQL ) If RS.EOF Then Response.Write "geen kaarten gekregen" Response.End End If
%> <TABLE Width='100%' Border=0 bordercolor=#FFFF99 CellPadding=0 CellSpacing=0 bgColor=#FFFFCC> <% Do Until RS.EOF Response.Write _ "<TR>" & _ " <TD align=""center""><img src=""" & RS("Kaart") & """></TD>" & _ " <TD align=""center"">" & RS("Wedstrijd") & "</TD>" & _ " <TD align=""center"">" & FormatDateTime( RS("Datum"), vbShortDate ) & "</TD>" & _ "</TR>" & vbNewLine RS.MoveNext Loop %> <% conn.close set conn = Nothing %> </TABLE></td> </tr> </table> </td> </tr> </table> </body> </html>
This is my code when I choose 'view source' in my browser:
<html> <head> <title>Spelers</title> </head>
<body> <table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#FFFFCC"> <tr> <td width="100%"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%"><b>Doelpunten: </b>0
It just stops here. Like you see, I'm not getting an error but the second part of my page doesn't appear.
|