Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL statment error?!

Status
Not open for further replies.

PogoWolf

Programmer
Mar 2, 2001
351
US
I'm writting this on an ASP page, with an Access (2k) DB.. Internal to Access the query below works fine...
but in ASP.. it returns this error...

Query:
SELECT DISTINCT [WhatsNew].[Date] FROM WhatsNew WHERE (((Format([whatsnew.date],"yyyy")=2001)));

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

any Ideas??
---===///The PogoWolf\\\===---
Darkness..Bleakness..Plastic forks..?

 
Personally I don't think that an Querry like this witch worked in Acess 2000 will work if u use ODBC cuz u use Format function witch is only in Acess.
So if u want to find all dates witch have Year=2001 you could just use this
Query:
SELECT DISTINCT Date FROM WhatsNew WHERE Date BETWEEN #01/01/2001# AND #12/31/2001#

the date in Acess it has to be rouded by #

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top