User-1387630685 posted
I got this sql query statement actually working with ASP.net w/ a MS Access db:
WHERE (Date Between #" & TextBox1.Text & "# AND #" & TextBox2.Text & "#)
Question is, is it possible to do it somewhat like the following?
-=-=
WHERE (Date Between @start AND @end)
da1.SelectCommand.Parameters.AddWithValue("@start", TextBox1.Text)
da1.SelectCommand.Parameters.AddWithValue("@end", TextBox2.Text)
-=-=
Not sure what difference it makes, but trying to use Parameters.AddWithValue throws errors on me every which way I have tried to do it. I tried putting in the # marks, etc., in different places, too.
Biggest part of my SQL statements are done using Parameters.AddWithValue, so I was just trying to stay consistent. But I also don't want to waste a lot of time if I'm trying to do something that is not possible.
Did some searching, but found nothing. Will bow to the more experienced on this one.
Thanks