|
-
Oct 22nd, 2011, 10:54 AM
#1
Thread Starter
Fanatic Member
sql Parameters working with Dates
Hello: I have an sql query and am trying to use parameters and it looks like this:
sql="Select * from tblTable where DateCreated Between ? and ?''
When I run it, it passes through with no errors; however, it doesn't get any data so thinking I must not be doing something correctly due to the Between statement and using dates.
Thanks,
Proctor
-
Oct 22nd, 2011, 11:12 AM
#2
Re: sql Parameters working with Dates
There is no inherent problem with dates and parameters, so presumably you are doing something wrong.
The possibilities include not passing in dates (but strings that get converted to dates, which often goes wrong), putting the values in the wrong order, the field being text based rather than date based, and more.
If you give us more details (such as the data type of the field, the code you use to add parameters, etc) we can hopefully work it out.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|