SelectCommand Multi Text Boxes
eveloc | Posted 8:49am 7. November 2007 Server Time |
I would like a form that has 3 text boxes. These 3 boxes are going to be used for entering search criteria. The first box is for searching a field called CasePK. The second is for searching a field called LinePK and the third is for searching a field called DOS. DOS is a date field. The other two are text fields.
I am using a SQLDATASOURCE and a Gridview. What will the SelectCommand look like so that I can search the 3 fields using the data from the textboxes?
|
Fredde | Posted 12:42am 8. November 2007 Server Time |
"SELECT field1, field2, field3 FROM table WHERE field1 = '" & CasePK & "' AND field2 = '" & LinePK & "' AND field3 = '" & DOS & "' "
If you´re using Access then replace the ' with a # on the field with the date statement. Also you might wanna replace the = with a LIKE statement
Reply to Post SelectCommand Multi Text Boxes
|
|
|