...

View Full Version : Problem with recordset



urko
02-09-2007, 07:00 PM
Hi all,

I have a small problem, that i just can solve.

on my page, user can search from a small calendar how many records were entered in one particualr day.
Now lets say u want to see how many new datas were entered yesterday.

so when i click on calnedar Feb. 8...i get all results :(

Part of my rs on detail page, where only datas from a particular day should be shown:




Dim MD
MD = Request.QueryString(("EntDate")
SELECT * FROM BLOG_TEME WHERE 'EntDate = "& MD &" '"

Thanks,

nikkiH
02-09-2007, 07:30 PM
Depending on the database you are using:

select * from tablename where fieldname = '01/01/2007'
select * from tablename where fieldname = #01/01/2007#

Either way, your quotes are in the wrong spot.
You should be using parameterized queries. Direct queries like this leave room for sql injection attacks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum