Print Page | Close Window

ADO Select Question

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=5218
Printed Date: 30 March 2026 at 7:46pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: ADO Select Question
Posted By: velkymx
Subject: ADO Select Question
Date Posted: 22 August 2003 at 11:33pm

I am using ASP (duh) and ADO to connect to an Access Database. I am trying to select a group of people for an entire month; ie: Select all of the member who registered this month.

I already have a database with the dates entered (in Date/Time format) but I just can figure out how to process it.

HELP!




Replies:
Posted By: Bunce
Date Posted: 23 August 2003 at 1:39am

Firstly, try to get a grip using the SQL dialect:
http://www.w3schools.com/sql - www.w3schools.com/sql

You then need to connect to the database using a connection string:
http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderFormicrosoftJet - http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet

To display your results, check out this site for some of Borgs scripts, the FAQ, or a search on google will give you many ideas.

Cheers,
Andrew



-------------
There have been many, many posts made throughout the world...
This was one of them.


Posted By: velkymx
Date Posted: 23 August 2003 at 12:31pm

I already know how to do select statements and connections. I just dont know how to pick out item where something = a date range. IE SELECT * WHERE Date >= 8/1/2003

Thanks!



Posted By: Bliss
Date Posted: 23 August 2003 at 5:18pm

SELECT * FROM tblSomething WHERE Field = "asdf"



-------------
Hehehe...


Posted By: b_bonnett
Date Posted: 23 August 2003 at 5:33pm

That would work for strings (if you used single quotes instead of double), but for dates in Access you need to enclose the date in the # character:

Select * From tblWhatever Where tblWhatever.Date >= #8/1/2003#

Blair



-------------
Webmaster, http://www.planegallery.net/ - The Plane Gallery
Greetings From Christchurch


Posted By: velkymx
Date Posted: 25 August 2003 at 4:56pm
Thanks everyone! It worked great.



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