View Single Post
  #4 (permalink)  
Old March 30th, 2005, 04:42 PM
ibi ibi is offline
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just realised how useless the info. I've given is.

I'm using MS Access through ADO using ASP.

There is another SQL query executed just before this one involving joins:

strSQL = "SELECT Category.CategoryID, Count(Category.Category) AS CountOfCategory, Category.Category, Category.Picture, Category.Comments, Product.Active, Product.AvailabilityID " &_
    "FROM Manufacturer INNER JOIN (Category INNER JOIN Product ON Category.CategoryID = Product.CategoryID) ON Manufacturer.ManufacturerID = Product.ManufacturerID " &_
    "GROUP BY Category.CategoryID, Category.Category, Category.Picture, Category.Comments, Manufacturer.ManufacturerID, Category.Display, Product.Active, Product.AvailabilityID " &_
    "HAVING (((Manufacturer.ManufacturerID)=" & man & ") AND ((Category.Display)=True) AND ((Product.Active)=True) AND ((Product.AvailabilityID)=0)) " &_
    "ORDER BY Category.Category;"

SET rsCategories = Server.CreateObject("ADODB.Recordset")
rsCategories.Open strSQL, Con, adOpenStatic, adLockReadOnly, adCmdText

The above is working fine. I thought perhaps the constants of the recordset object could possibly interfere with the next SELECT TOP statement actually not selecting the TOP rows but ALL rows?

Thnx

Reply With Quote