When I run this code locally it queries the database for information and displays it, but for whatever reason, displays an error (below the information it displays) which reads,
Exception occurred.
sideloader.asp, line 75
Line 75 is:
Here is the connection code:
Here is the "display it" code:
~E
Exception occurred.
sideloader.asp, line 75
Line 75 is:
Code:
Response.Write("<img src=" & Rec1("PIC") & " border=0>")
Here is the connection code:
Code:
Dim oConn, Rec1, Rec2, sConn, sFilePath
Set oConn = Server.CreateObject("ADODB.Connection")
sFilePath = Server.MapPath("db/logins.mdb")
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sFilePath & ";"
oConn.Open sConn
Set Rec1 = oConn.Execute("SELECT * FROM inventory WHERE TYPE='Sideloader'")
Set Rec2 = oConn.Execute("SELECT * FROM logins")
Do While Not Rec1.EOF
Do While Not Rec2.EOF
Here is the "display it" code:
Code:
Response.Write("<table width=100% height=135 border=0 align=center cellpadding=0 cellspacing=0>")
Response.Write("<tr>")
Response.Write("<td width=137 height=30 align=left valign=bottom background=images/bar.gif>Photos</td>")
Response.Write("<td width=275 align=left valign=bottom background=images/bar.gif>Vehicle Information</td>")
Response.Write("<td width=67 align=left valign=bottom background=images/bar.gif>Mileage</td>")
Response.Write("<td width=71 align=left valign=bottom background=images/bar.gif>Price</td>")
Response.Write("</tr>")
Response.Write("<tr>")
Response.Write("<td width=80 align=center valign=middle>")
Response.Write("<img src=" & Rec1("PIC") & " border=0>")
Response.Write("</td>")
Response.Write("<td width=450 align=left valign=top>")
Response.Write(Rec1("YR"))
Response.Write(", ")
Response.Write(Rec1("MK"))
Response.Write(", ")
Response.Write(Rec1("MD"))
Response.Write(", ")
Response.Write("<b>Stock #: </b>")
Response.Write(Rec1("STK"))
Response.Write("<br>")
Response.Write("<img src=images/phone.gif>")
Response.Write(Rec2("Phone"))
Response.Write(", ")
Response.Write(Rec2("CustName"))
Response.Write(", ")
Response.Write(Rec2("Address"))
Response.Write("<br>")
Response.Write ("Email Dealer: ")
Response.Write(Rec2("email"))
Response.Write("</td>")
Response.Write("<td width=60 align=center valign=right>")
Response.Write(Rec1("MILES"))
Response.Write("</td>")
Response.Write("<td width=60 align=center valign=right>$")
Response.Write(Rec1("Price"))
Response.Write("</td>")
Response.Write("</tr>")
Response.Write("</table>")
Rec1.MoveNext
Rec2.MoveNext
Loop
Loop
oConn.Close
~E