Print Page | Close Window

Access Query

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3371
Printed Date: 29 March 2026 at 3:19pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Access Query
Posted By: phorne
Subject: Access Query
Date Posted: 07 June 2003 at 6:36pm

I have a Access database that has one table with a field called division.  The database is full of race car drivers in several divisions. I have access queries that selects drivers and their race results by division. I need to select records by using the queries I have in Access.... can this be done??

Statement I am using to select all records:

strSQL = "SELECT thursdaythunder.* FROM thursdaythunder order by car;"

The database is named thunder, the table is named thursdaythunder and some of the queries are named: bandits, masters, pro... etc




Replies:
Posted By: TYSON
Date Posted: 07 June 2003 at 7:28pm

Try this

strSQL = "EXECUTE bandits;"

And if you have query's that require parameters, you could just do so like this.

strSQL = "EXECUTE bandits Param1, Param2;"

Where param 1 and 2 are the values you want to pass into the query.

Hope this helps



-------------
http://www.fuo-motorsports.com/ - http://www.fuo-motorsports.com/


Posted By: phorne
Date Posted: 07 June 2003 at 8:01pm

Thanks - one good answer leads to another dumb question!

I am new to this - have never used the Execute statement..

It worked...

I also finally got it to work with the following:

strSQL = "SELECT * FROM Masters order by [6/5/03];"

I tried to order the Execute command but it did not work..

strSQL = "EXECUTE masters order by [6/5/03];"

Is it better to use the execute statement...

Also I would like to have a dropdown box with the divisions in it that would then pass the desired statement to the execute statement or the one I got to work.

Can that be done??



Posted By: TYSON
Date Posted: 07 June 2003 at 9:46pm
You can change the Ordering of the statement by modifying the query in access

-------------
http://www.fuo-motorsports.com/ - http://www.fuo-motorsports.com/


Posted By: TYSON
Date Posted: 07 June 2003 at 9:51pm

You also dont have to use the execute command to fire the query, here's a article that may explain it a little better.

http://www.xefteri.com/articles/apr302002/default.aspx - http://www.xefteri.com/articles/apr302002/default.aspx



-------------
http://www.fuo-motorsports.com/ - http://www.fuo-motorsports.com/


Posted By: farrukh
Date Posted: 08 June 2003 at 12:07am

Originally posted by phorne phorne wrote:


strSQL = "SELECT * FROM Masters order by [6/5/03];"
-------------------------------------------^^^^^
Is these is the field name in the database.........



-------------
i have collected some nice avatars (37) and smileys (227) here you can download
http://www24.brinkster.com/webmastertool/download.html



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net