|
-
Mar 10th, 2010, 02:46 PM
#1
Thread Starter
Fanatic Member
DB Search Command
I've got a searh form with about 8 different boxes where a user can enter data to search from. To save writing many different search commands I want to be able to write one and if the field is empty then search all records
for example
SELECT * FROM MyTable WHERE CarType = CarType.Text And Color = Color.Text
If a user enters a Color then search it otherwise don't narrow down the results so like this
SELECT * FROM MyTable WHERE CarType = ""
How can I do this? would it be like the % sine if Color.Text is = String.Empty??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|