Parameterized query
Hi,
I prepared DataAdapter with SQL query with two parameters.
The Query is: "Select * from tblX where (XDate between ? And ?);
I built a date grid to bind it with the dataset of the dataAdapter.
The two parameters come from two dateTimePickers controles.
My problem is how to set to the adapter command the two perameters.
I want something like: Select * from tblX where (XDate between dateTimePicker1.Value And dateTimePicker2.Value );
Please help.
Regards...
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

sacrespRank #1,944 · 754 pointsPosted Feb 9, 2005, 5:16 AM EST
mikerRank #2,843 · 502 pointsPosted Feb 9, 2005, 5:45 AM EST
sacrespRank #1,944 · 754 pointsPosted Feb 12, 2005, 5:29 AM EST
ashug12 pointsPosted Feb 15, 2005, 12:53 AM EST