Multiple search criteria datagrid

B

Bigfoot

Hi,

I have a webform with a datagrid, 2 textboxes and a button. The datagrid is
filled by a sql database.

What I want is: to search the database based on the values of the 2
textboxes. I think I have to combine the values somehow into 1 sql query,
but I don't know how. The results wil be displayed in the datagrid.

So I want is a search within a search but I don't know how to do this.

Thanx in advance!

Stefan
 
A

Alvin Bruney [MVP]

not sure what you are asking. the textboxes will form the where clause of
the query
select * from blah where item = textbox1.text and item2 = textbox2.text

if you have all the data in the grid, you should just filter the dataset but
the textbox criteria to prevent unnecessary load on the database. have a
look at the datatable. select function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top