For a bit of background info I'm a Network Admin/Systems Admin with very very minimal self-taught programming 'skills'. In the past I have just modified and tweaked existing code to get whatever I was looking for to work but I'm not having any luck with this current project. I am looking to add dynamic prices from a sql table into an existing html table for only a few of the records that are in the sql table.
I'm using a locally hosted server using IIS6 with a mix of ASP.net 2.0 and classic asp on the site with a 2008 MS SQL Server database.
I already have the connection to the db made in global.asa and am looking for how I can correspond each price to each html item number in the table.
(the sql code I copy/pasted from a different asp file with different intentions so if something looks completely off its probably because of that :[ )
Ex:
<html>
<head>
<%
sql = "SELECT * FROM tblProductCatalogue WHERE ( (tblProductCatalogue.CustomerID = 1 ) and (tblProductCatalogue.ItemNumber = ItemNumber)) "
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
if NOT rs.eof then
rs.MoveFirst
DerivedPrice = rs("DerivedPrice")
rs.close
Set rs = Nothing
%>
</head>
<body>
<table>
<tr>
<th>Item Number</th>
<th>Description</th>
<th>Price</th>
</tr>
<tr>
<td>PartNumber1</td>
<td>description1</td>
<td><%DerivedPrice%></td>
</tr>
<tr>
<td>PartNumber2</td>
<td>description2</td>
<td><%DerivedPrice%></td>
</tr>
<tr>
<td>PartNumber3</td>
<td>description3</td>
<td><%DerivedPrice%></td>
</tr>
</table>
</body>
</html>
Thanks!
Stan