Re: Problem with ASP/Access DB



AfterLife wrote:
Hi,

I'm using the following SQL Statementbut i won't work.

Please describe your symptoms without using the meaningless "won't work"
mantra.

I allready tried different types of date (YY/MM/DD and others).
The "date" Filed is formatted as Time/Date Field in Access.

SELECT * FROM <tabelle> WHERE date > '31.12.2006' ORDER BY Datum DESC


Date literals have to be delimited with octathorps (#). In Jet, they should
use the YYYY-MM-DD format.
Of course, if you use parameters, then you don't have to worry about sql
injection or delimiters:

http://mvp.unixwiz.net/techtips/sql-injection.html
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23

See here for a better, more secure way to execute your queries by using
parameter markers:
http://groups-beta.google.com/group/microsoft.public.inetserver.asp.db/msg/72e36562fee7804e

Personally, I prefer using stored procedures, or saved parameter queries
as
they are known in Access:

Access:
http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=e6lLVvOcDHA.1204%40TK2MSFTNGP12.phx.gbl

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&selm=eHYxOyvaDHA.4020%40tk2msftngp13.phx.gbl





--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.



Relevant Pages

  • Re: Date and Time
    ... datetimes are not stored with any format. ... The first integer contains the number of days since the seed date. ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)
  • Re: Date confusion
    ... > program will work with the date format mm/dd/yyyy and other times it ... > is dd/mm/yyyy and sometimes it will work with both. ... > program the application will work with the mm/dd/yyyy format and some ... This email account is my spam trap so I ...
    (microsoft.public.scripting.vbscript)
  • Re: Finding block begin/end in VBScript
    ... I never used it (Format() was so handy) so I forgot it was there. ... the Execute method definitely was not in VB/VBA (I checked the docs ... Bob Barrows ... This email account is my spam trap so I ...
    (microsoft.public.vsnet.ide)
  • Re: regexp pattern help
    ... But can you make a pattern that "knows" how many days a certain month has? ... Just using the IsDate function wouldn't be enough in this case since you can ... But my app only alows the exact format, ... This email account is my spam trap so I ...
    (microsoft.public.scripting.vbscript)
  • Re: Finding block begin/end in VBScript
    ... I never used it (Format() was so handy) so I forgot it was there. ... the Execute method definitely was not in VB/VBA (I checked the docs ... Bob Barrows ... This email account is my spam trap so I ...
    (microsoft.public.scripting.vbscript)