Soha wrote:[color=blue]
> I have already look on
www.aspfaq.com before i post this erorr. and i
> have something to add to my code. this part of the sql_statment is
> actually written in this way: "((n_data.news_ref_date >=
> "'&request("from")&"') or (n_data.news_ref_date
> <='"&request("to")&"')) "[/color]
Dynamic SQL ... ughh!
[color=blue]
> "from" and "to" are textfields and they return type date.
> and i think that they coz this problem but i don't know how to solve
> it.[/color]
Given that you are using this insecure* as well as inefficient technique,
these should help:
http://www.aspfaq.com/show.asp?id=2313 vbscript
http://www.aspfaq.com/show.asp?id=2040 help with dates
http://www.aspfaq.com/show.asp?id=2260 dd/mm/yyy confusion
Here's a better way:
http://groups-beta.google.com/group/...d322b882a604bd
Even this is better:
http://groups-beta.google.com/group/...e36562fee7804e
Bob Barrows
*Here is why it is insecure:
http://mvp.unixwiz.net/techtips/sql-injection.html http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23
--
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"