Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 26th, 2007, 06:58 PM
Authorized User
 
Join Date: Jun 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with running different querys

I am trying to put together a classic asp page that will show different values for different dates for 6 different locations, example:
[11/29/07] [Location 1] [200]
in my tables each location has its own code and the dates need to be dynamic, there may be some dates where there is no data in this case i want the web page to display "Open" I know if i open a record set with a query i can do a record count and if it is null then i can default the value to "open" on the page But i need to do this 90 times (90 days)* 6 locations and since each location sits next to each other on the page ex:
Date | Location 1 | Location 2 | and so on
i need to grab each value for each location 1 date at a time and i dont want to open and close the record set over and over to run a different query each time. But I don't know of any way to run a query directly against a DB from within ASP and i just can't think of another way to do it. So if anyone know a way to A. Directly query a table from ASP or has a better suggestion other then to open and close the recordset over and over again (this just dosen't seem like an efficient way to do it) please share :)

Thanks,
Jim
 
Old November 27th, 2007, 01:58 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

It shouldn't be any problem to loop through the locations calling your SQL queries from within the loop without opening and closing your connection or your recordset. You can set your recordset to nothing but I think you can also just refill it with data on every pass. And also write your html within the loop.






Similar Threads
Thread Thread Starter Forum Replies Last Post
How many Instances are running dash dev C# 2005 7 December 5th, 2007 04:05 PM
Running J2EE bluecat2010 J2EE 1 January 2nd, 2007 01:35 AM
reusing querys jc188 Beginning PHP 3 April 1st, 2006 02:28 AM
Make Table & Append Querys lryckman Access 1 January 25th, 2006 05:38 PM
ADO object failure for larger querys rowlandc Excel VBA 0 May 5th, 2004 11:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.