By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,667 Members | 1,348 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,667 IT Pros & Developers. It's quick & easy.

let the user decide

P: n/a

I want to let the user decide for the date in the query. I want to sort the
database and put it in the datagrid.
I wrote this query :

SELECT *FROM table WHERE date BETWEEN #27/6/2005 20:20:30# and #28/6/2005
20:20:30#
And it works
But I want to put two MaskedBoxs and let the user decide for the date
I know how to do it with one variable but for two, please some one help me
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
"sase m via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in
news:52***********@DotNetMonster.com:

I want to let the user decide for the date in the query. I want to
sort the database and put it in the datagrid.
I wrote this query :

SELECT *FROM table WHERE date BETWEEN #27/6/2005 20:20:30# and
#28/6/2005
20:20:30#
And it works
But I want to put two MaskedBoxs and let the user decide for the date
I know how to do it with one variable but for two, please some one
help me

FYI, take a look at SQLParameters... using SQLParameters will prevent
malcious data from being entered into the SQL command. It'll also allow you
to specify dynamic parameters easily.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 21 '05 #2

P: n/a
Sase,

See this simple sample on our site (there is as well another parameter
sample)

http://www.windowsformsdatagridhelp....6-7139b8970071

I hope this helps,

Cor
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.