Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 03, 2012 01:05 AM by Prashant Kumar
Member
86 Points
60 Posts
Nov 03, 2012 12:33 AM|LINK
I have fought with this all day!
I need to select records by date, this is my present script.
WeekDate = Request("txtRqDate")
rsClndr.Open "SELECT * FROM UvClndr WHERE UvDate = #" & WeekDate & "#, cnnct, 3, 3
I do not know how many different syntax's I have tried, but I have not hit the right one.
Thanks in advance for any assistance
Tony
Star
12528 Points
2024 Posts
Nov 03, 2012 01:05 AM|LINK
I guess you are in the wrong forum - your question is about ADO not ASP.Net/ADO.Net
As to your question, you should be using a parameterized query.
Some references http://support.microsoft.com/kb/200190
http://www.vbforums.com/showthread.php?548787-Database-Why-should-I-use-Parameters-instead-of-putting-values-into-my-SQL-string
Tony Zine
Member
86 Points
60 Posts
Syntax for selecting records in Open.Recordset using date fields.
Nov 03, 2012 12:33 AM|LINK
I have fought with this all day!
I need to select records by date, this is my present script.
WeekDate = Request("txtRqDate")
rsClndr.Open "SELECT * FROM UvClndr WHERE UvDate = #" & WeekDate & "#, cnnct, 3, 3
I do not know how many different syntax's I have tried, but I have not hit the right one.
Thanks in advance for any assistance
Tony
Prashant Kum...
Star
12528 Points
2024 Posts
Re: Syntax for selecting records in Open.Recordset using date fields.
Nov 03, 2012 01:05 AM|LINK
I guess you are in the wrong forum - your question is about ADO not ASP.Net/ADO.Net
As to your question, you should be using a parameterized query.
Some references http://support.microsoft.com/kb/200190
http://www.vbforums.com/showthread.php?548787-Database-Why-should-I-use-Parameters-instead-of-putting-values-into-my-SQL-string