Answered by:
Create a query from filters

Question
-
User-1618168713 posted
Hello All,
I am a bit unsure of the best way to go about this. I have a form where data is entered, date ranges, usernames, passwords etc and when the button is pressed on the form it searches a database and returns values which match the values entered.
I can't think of the most efficient way to do this, could anyone give some pointers on where to start?
I thought perhaps of writing a query and then just putting in the variables which pick up the entered values and reading it all in as one big string something like:
SELECT * FROM DB WHERE ProductID = "DateTxtBox" & "NameTxtBox"
I haven't checked the syntax but this is just to give you a idea of what I am thinking.
Thanks
Tuesday, January 25, 2011 5:09 AM
Answers
-
User-2139489267 posted
can you tell me is there a way to link a asp button to a datasource. So if I have a datasource all setup when a user clicks button1 it will start running the query in datasource1?Hey go through below link, it will lead to you right direction:
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/default.aspx
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, January 26, 2011 10:35 AM
All replies
-
User-2139489267 posted
SELECT * FROM DB WHERE ProductID = "DateTxtBox" & "NameTxtBox"
I haven't checked the syntax but this is just to give you a idea of what I am thinking.
Here's the way to get started
Tuesday, January 25, 2011 5:22 AM -
User-1083922933 posted
Hi
Please Take a look at the following thread:
http://forums.asp.net/p/1639358/4239206.aspx
If This Helps Please Mark as Answer
Good Luck
Tuesday, January 25, 2011 5:29 AM -
User-1618168713 posted
Hello there!
Thanks for advice, can you tell me is there a way to link a asp button to a datasource. So if I have a datasource all setup when a user clicks button1 it will start running the query in datasource1?
Thanks
Wednesday, January 26, 2011 9:51 AM -
User-2139489267 posted
can you tell me is there a way to link a asp button to a datasource. So if I have a datasource all setup when a user clicks button1 it will start running the query in datasource1?Hey go through below link, it will lead to you right direction:
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/default.aspx
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, January 26, 2011 10:35 AM -
User1867929564 posted
use parameterized query ,
http://www.google.co.in/search?hl=en&q=parameterized+query+in+mdb&aq=f&aqi=&aql=&oq=Thursday, January 27, 2011 6:07 AM