Evert Jor
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.pC omment, 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.j pg" 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.j pg" alt="">
</div>
<div class="best_text">
<h2>products.pName</h2>
<p>products.pComment</p>
</div>
<div class="best_image">
<img src="images/products.pID.j pg" alt="">
</div>
<div class="best_text">
<h2>products.pName</h2>
<p>products.pComment</p>
</div>
</div>
get-top-3-products-displayed.txt
---
SELECT TOP 3 products.pID, products.pName,products.pC
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.j
</div>
<div class="best_text">
<h2>products.pName</h2>
<p>Pure products.pComment</p>
</div>
<div class="best_image">
<img src="images/products.pID.j
</div>
<div class="best_text">
<h2>products.pName</h2>
<p>products.pComment</p>
</div>
<div class="best_image">
<img src="images/products.pID.j
</div>
<div class="best_text">
<h2>products.pName</h2>
<p>products.pComment</p>
</div>
</div>
get-top-3-products-displayed.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER