Date Range Comparisons in MSDE failing

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jim Evans (jim.evans_at_ge.com)
Date: 09/29/04


Date: Wed, 29 Sep 2004 06:19:59 -0700

I have an SQL statement that I am programmatically
populating, depending on user input. The string is...

SELECT * FROM Tickets WHERE (TicketDateStarted > #" &
Date1 & "#) AND (TicketDateStarted < #" & Date2 & "#)
ORDER BY TicketDateResolved

I have checked all of my fields and they are all getting
data in the Date1 and Date2 variables correctly. When I
execute the app (Which worked for MSACCESS -AS IS- ), I
get "Incorrect syntax near '#'." from the reader.

This is a major part of my app and the main thing holding
me back from deployment. Any ideas anyone??



Relevant Pages

  • need simple parsing ability
    ... For each run of my app, I have a known set of wafer names. ... sometimes a short string followed by an integer, ... I need to read user input of a subset of these. ...
    (comp.lang.python)
  • RE: Date Range Comparisons in MSDE failing
    ... > populating, depending on user input. ... The string is... ...
    (microsoft.public.sqlserver.programming)
  • Re: sql string + variable
    ... Depending on user input one of strings is selected. ... If I put string in program works ok, but, if I use string from require file I can not seem to insert variable. ... ',member_lname) as 'member' from member_cccb_lnk join member on join cccb on ...
    (alt.php)
  • Re: Degenerate strcmp
    ... string, depending on user input. ... to warrant strcmp checking for pointer equality. ...
    (comp.lang.c)
  • Re: php variable in sql string
    ... Depending on user input one of strings is selected. ... put string in program works ok, but, if I use string from require file I ... ',member_lname) as 'member' from member_cccb_lnk join member on ...
    (comp.lang.php)