OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Account Expires DRW problem

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Account Expires DRW problem
Page: [1]
 
winter

 

Posts: 181
Joined: 3/12/2002
From: Toronto ON Canada
Status: offline

 
Account Expires DRW problem - 6/2/2009 11:17:18   
Hi All - I am having a challenge with creating a drw return on records from my spooky login DB program. I would like to have a list of members whose accounts have expired between 2 dates. I used the FP003 wizard to create this and then put the .asp page on the spooky diet.

Here is the line in question:
<%
fp_sQry="SELECT * FROM Users WHERE (AccountExpires > '1/1/2005' AND AccountExpires < '12/31/2006') ORDER BY AccountExpires ASC,AccessLevel ASC,x_Lastname ASC"

The error returned says:
Database Results Wizard Error
Description: Data type mismatch in criteria expression.
Number: -2147217913 (0x80040E07)
Source: Microsoft JET Database Engine

I tried putting double quotes around the dates and when that didn't work I put double and single quotes around each date - with the more specific error message of an Error due to syntax at AccountExpires.

What am I missing? :)

Thanks soooo much

Carolyn
TexasWebDevelopers

 

Posts: 720
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Account Expires DRW problem - 6/2/2009 12:02:00   
Access database?
Try hashmarks around dates:
fp_sQry="SELECT * FROM Users WHERE (AccountExpires > #1/1/2005# AND AccountExpires < #12/31/2006#) ORDER BY AccountExpires ASC,AccessLevel ASC,x_Lastname ASC"



_____________________________

:)

Follow us on TWITTER

(in reply to winter)
winter

 

Posts: 181
Joined: 3/12/2002
From: Toronto ON Canada
Status: offline

 
RE: Account Expires DRW problem - 6/2/2009 14:43:27   
Thanks so much for the suggestion which i have just tried. It generates a new error:

"Database Results Wizard Error
Description: Command text was not set for the command object."

Have no idea what that means. Is it possible that the hash marks also need quotes? Single or double?

Ideas welcomed!

Carolyn

(in reply to TexasWebDevelopers)
TexasWebDevelopers

 

Posts: 720
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Account Expires DRW problem - 6/2/2009 18:37:14   
Well, ya' can't break anything...I think you are correct, single quotes around the hashes

_____________________________

:)

Follow us on TWITTER

(in reply to winter)
Spooky

 

Posts: 26680
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Account Expires DRW problem - 6/2/2009 18:52:28   
Try this?

fp_sQry="SELECT * FROM Users WHERE (AccountExpires BETWEEN #1/1/2005# AND #12/31/2006#) ORDER BY AccountExpires ASC,AccessLevel ASC,x_Lastname ASC"

With dates, in Access you can use #

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

Sp:)ky


(in reply to TexasWebDevelopers)
winter

 

Posts: 181
Joined: 3/12/2002
From: Toronto ON Canada
Status: offline

 
RE: Account Expires DRW problem - 6/2/2009 19:51:10   
My goodness! Thank you both!!! It was the word BETWEEN that was missing and I had no idea that it should go there. The code works perfectly.

You have made my day!!!!

With much gratitude

Carolyn:)

(in reply to Spooky)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Account Expires DRW problem
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts