same name parameters

Results 1 to 2 of 2

Thread: same name parameters

  1. #1
    Join Date
    Dec 1969

    Default same name parameters

    could you tell me if its at all possible to add values for multiple parameters of the same name in a query string<BR><BR>ie with some other method other than <BR><BR>objCmd.Parameters.Add(New OleDbParameter("@SEARCH",blah))<BR><BR>my query string looks something like this<BR><BR>select * from Products where ProductName Like @SEARCH OR ProductID LIKE @SEARCH etc etc<BR><BR><BR>thanks <BR>mb<BR><BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Why don't you just build..

    .. the SQL string?<BR><BR>sql = "SELECT * FROM products WHERE productname LIKE &#039;" & search & "&#039; OR productid LIKE &#039;" & search & "&#039;"

Posting Permissions

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