Re: Problem with ASP/Access DB
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Sat, 6 Jan 2007 08:54:15 -0500
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"
.
- Follow-Ups:
- Solved the Problem
- From: AfterLife
- Solved the Problem
- References:
- Problem with ASP/Access DB
- From: AfterLife
- Problem with ASP/Access DB
- Prev by Date: Problem with ASP/Access DB
- Next by Date: Solved the Problem
- Previous by thread: Problem with ASP/Access DB
- Next by thread: Solved the Problem
- Index(es):
Relevant Pages
|