dhayes
04-05-2005, 07:57 AM
hey guys im trying to display informtion and images from my database with this code but the server does not seem to display anything i am very new to asp and any help would be appreciated thanks. Heres the code
<%
Dim adoCon
Dim rs
Dim strSQL
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("clothes.mdb")
Set rs= Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT products.Brand, products.Category, products.Sex, products.Price, products.Description, products.Image FROM products WHERE Brand='Matix'"
strSQL = "SELECT products.Brand, products.Category, products.Sex, products.Price, products.Description, products.Image FROM products WHERE Brand='Matix'"
rs.Open strSQL, adoCon
Do While not rs.EOF
%>
<table border="0">
<tr>
<td>Brand:</td>
<td><% Respone.Write rs("Brand") %></td>
</tr>
<tr>
<td>Category:</td>
<td><% Respone.Write rs("Category") %></td>
</tr>
<tr>
<td>Sex:</td>
<td><% Respone.Write rs("Sex") %></td>
</tr>
<tr>
<td>Price:</td>
<td><% Respone.Write rs("Price") %></td>
</tr>
<tr>
<td>Description:</td>
<td><% Respone.Write rs("Description") %></td>
</tr>
<tr>
<td>Image:</td>
<td><img src="<% Respone.Write rs("Image") %>" border="0"></td>
</tr>
</table>
<%
Loop
rs.Close
Set rs = Nothing
Set adoCon = Nothing
%>
<%
Dim adoCon
Dim rs
Dim strSQL
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("clothes.mdb")
Set rs= Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT products.Brand, products.Category, products.Sex, products.Price, products.Description, products.Image FROM products WHERE Brand='Matix'"
strSQL = "SELECT products.Brand, products.Category, products.Sex, products.Price, products.Description, products.Image FROM products WHERE Brand='Matix'"
rs.Open strSQL, adoCon
Do While not rs.EOF
%>
<table border="0">
<tr>
<td>Brand:</td>
<td><% Respone.Write rs("Brand") %></td>
</tr>
<tr>
<td>Category:</td>
<td><% Respone.Write rs("Category") %></td>
</tr>
<tr>
<td>Sex:</td>
<td><% Respone.Write rs("Sex") %></td>
</tr>
<tr>
<td>Price:</td>
<td><% Respone.Write rs("Price") %></td>
</tr>
<tr>
<td>Description:</td>
<td><% Respone.Write rs("Description") %></td>
</tr>
<tr>
<td>Image:</td>
<td><img src="<% Respone.Write rs("Image") %>" border="0"></td>
</tr>
</table>
<%
Loop
rs.Close
Set rs = Nothing
Set adoCon = Nothing
%>