search multiple databases

Results 1 to 2 of 2

Thread: search multiple databases

  1. #1
    Join Date
    Dec 1969

    Default search multiple databases

    I have 6 different databases that I want to enable my users to be able to search. Right now, they can specify which ones they want to search by clicking a radial button either yes or no. Then when I go to coding it, I have an if statement that states "if (database.value="yes") then" search that database. Here is the problem, It searches every database regardless if they wanted to or not. If anyone has any suggestions on how to accomplish this task, please let me know. Thanks

  2. #2
    Sathiya Guest

    Default RE: search multiple databases

    &#060;input type=radio name="Database" value="1"&#062;<BR>&#060;input type=radio name="Database" value="2"&#062;<BR>&#060;input type=radio name="Database" value="3"&#062;<BR>.<BR><BR>If request.Database &#060;&#062; "" Then<BR> USE SELECT CASE <BR>Select Case Request.Database<BR> Case "1"<BR> Valu = "Database1"<BR> Case "2"<BR> Valu = "Database2"<BR>.<BR>.<BR><BR>Then in the query use the Valu which is a variable<BR><BR>sqlstr = "Select * from "<BR>sqlstr = sqlstr & Valu<BR><BR>Execute the query.<BR><BR>Hope this helps<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts