Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Error (0x80040E10) Syntax error in string in query expression 'reportdate'
Old 02-20-2006, 01:50 AM Error (0x80040E10) Syntax error in string in query expression 'reportdate'
Novice Talker

Posts: 14
Trades: 0
Hola senora en senor.

At first, I have an error message that says : (0x80040E10) No Value given for one or more parameters.
And then, when I tweak the codes abit here & there, a second error message appears:
(0x80040E10) Syntax error in string in query expression 'reportdate'
Currently, my ASP page can display all table names that is retrieved from a table 't_tablenames' & the respective tables sits in their own database. For eg. 2004.mdb , 2005.mdb
Apart from that, I also want to implement a date range input where the User can select the date range. For eg. 12/02/2004 - 14/02/2004
I have actually tried to do the date range input & executing it upon clicking the "Submit" button but it seems that only the field columns are displayed. Is there something wrong with my SQL statement or my ASP codes?

SQL : "SELECT * FROM " & Request.Form("tblInfo") & " WHERE reportdate BETWEEN " & Request.Form("box1") & " AND " & Request.Form("box2")

All my tables have a field name [reportdate] & its data type is in Long Date(Eg. dd/mm/yyyy )
I'm not really sure where exactly is my mistake. Do hope you could point it out to me.
DOLL is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-20-2006, 04:22 AM Re: Error (0x80040E10) Syntax error in string in query expression 'reportdate'
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
it means that one of the variables you are using is empty

Do some basic debugging and response.write out the value of the SQL query before calling it and post the result

(BTW: This should be in the asp forum)
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-20-2006, 06:11 AM Re: Error (0x80040E10) Syntax error in string in query expression 'reportdate'
Novice Talker

Posts: 14
Trades: 0
Hola senor.
Sorry. But I had thought that DB related questions should be posted here. Erm. Maybe I'm wrong. I have already Response.Write out my values but I cannot seem to find the error. I also had already searched & tweak my codes but I still end up confused. The SQL turns out ok to me:
SELECT * FROM Consolidatedblacklist WHERE reportdate BETWEEN 12/02/2004 AND 13/02/2004

Is that correct senor?
DOLL is offline
Reply With Quote
View Public Profile
 
Old 02-20-2006, 10:29 AM Re: Error (0x80040E10) Syntax error in string in query expression 'reportdate'
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
No the error number reported is an ASP error code.
The dates should be in quotes (') and Access may need date literal delimiters (#) around the dates.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Error (0x80040E10) Syntax error in string in query expression 'reportdate'
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.39502 seconds with 12 queries