Query one database field with 2 parameters.

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Query one database field with 2 parameters.

    I am trying to query a database field with several check boxes from a form. I
    though this would work but it doesn?t : Select * From table WHERE Field =
    VarSomething VarSomething 0 Request.Form(?cbSomething1?)
    VarSomething 0 Request.Form(?cbSomething2?) Or this Select * From Table
    WHERE Field = VarSomething OR Field = VarSomethingElse
    VarSomething 0 Request.Form(?cbSomething1?)
    VarSomething Else 0 Request.Form(?cbSomething2?)

    wellsuited Guest

  2. Similar Questions and Discussions

    1. How do I use URL parameters to return a specific field?
      I have a form, when users complete it I would like to have a confirmation page that returns the value of the "first_name" field from the form, eg....
    2. Too Few Parameters?? Date field?
      Hi, Access, DWMX, ASP, VBScript. SELECT eventydate FROM qryEvents ORDER BY eventydate ASC Is returning:
    3. Passing Query Parameters in Sub-Queries
      coder23 wrote: '1/1/2004' ??? Shouldn't it be #'1/1/2004# ? Or are these Text parameters? You need to create another saved query for this: ...
    4. Alternate for passing parameters for dbase query?
      And perhaps this could give you some ideas about avoiding querystrings: ASP Design Tips - Post Back Page...
    5. using Command to set Parameters and Recordset to retrive the Query
      Hi guys, withou using SP, I want to be able to add a Parameter to the SQL Query and retrive the Recordset so I can use the Paging property under...
  3. #2

    Default Re: Query one database field with 2 parameters.

    Does this help?


    SELECT *
    FROM table WHERE (Field = '" & Request.Form("cbSomething1") & "') OR (Field = '" & Request.Form("cbSomething2") & "')
    mxa Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139