Link to home
Start Free TrialLog in
Avatar of Evert Jor
Evert JorFlag for Norway

asked on

Classic ASP help needed for displaying data from an Access database on an ASP-page.

I have an  SQL query from Access below and some code from the ASP page where the data is to be displayed. I need to make the database connection, pull the data into an array and display it on the page. Please - I need some help writing the code. In the example below I have used the same field names in both the query and in the positions on the page where the results are to be displayed:
---
SELECT TOP 3 products.pID, products.pName,products.pComment, products.pDateAdded
FROM products
GROUP BY products.pID, products.pName, products.pDateAdded
ORDER BY products.pDateAdded DESC;

From the web page where I need to incorporate the query results:

<div class="best_image"
<img src="images/products.pID.jpg" alt="">
</div>
<div class="best_text">
<h2>products.pName</h2>
<p>Pure products.pComment</p>
</div>

<div class="best_image">
<img src="images/products.pID.jpg" alt="">
</div>
<div class="best_text">
<h2>products.pName</h2>
<p>products.pComment</p>
</div>

<div class="best_image">
<img src="images/products.pID.jpg" alt="">
</div>
<div class="best_text">
<h2>products.pName</h2>
<p>products.pComment</p>
</div>
</div>
get-top-3-products-displayed.txt
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Evert Jor

ASKER

Thanks. I found some examples that I could use.