jjr0319
07-18-2006, 08:48 AM
im trying to create a database search for Access in ASP.net 1.1. i have 6 search fields (3 textboxes and 3 drop down lists) that i want users to be able to search by. i tried using a SELECT..WHERE...OR and SELECT...WHERE..AND statements, however, none are returning results to my liking. i think i need to create a SQL statement that will combine AND and OR with the WHERE clause, but have no idea how to write this. below are the details of the search fields & database.
table name: DOC_INFO
search field _______________related database field
txtDocNum______________________DOC_NUM
txtStDate_______________________ST_DATE
txtEstAmt_______________________EST_AMT
ddProgram_______________________PROGRAM_ID
ddRegion________________________REGION
ddCreatedBy_____________________EMAIL
i want users to be able to search by each field seperately, multiple fields at once, or no fields to display the entire database.
any help is greatly appreciated.
thanks in advance
table name: DOC_INFO
search field _______________related database field
txtDocNum______________________DOC_NUM
txtStDate_______________________ST_DATE
txtEstAmt_______________________EST_AMT
ddProgram_______________________PROGRAM_ID
ddRegion________________________REGION
ddCreatedBy_____________________EMAIL
i want users to be able to search by each field seperately, multiple fields at once, or no fields to display the entire database.
any help is greatly appreciated.
thanks in advance