send multiple values to SP

Discussion in 'ASP General' started by shank, Nov 19, 2004.

  1. shank

    shank Guest

    I have a stored procedure that requires one variable to be filled: WHERE
    ItemNo = @ItemNo
    Instead of sending 1 value, I'd like to send a bunch of values.
    I don't mind changing the SP if I new how to approach this.
    The user would select any number of ItemNo's from a form and submit.
    Assume ItemNo's like: B1, B2, B3, etc...
    The end result would be something like ...
    WHERE ItemNo = B1 or ItemNo = B5 or ItemNo = B10 ...etc....

    I want to build a recordset based on the user's selections.
    How?

    thanks!
     
    shank, Nov 19, 2004
    #1
    1. Advertising

  2. shank wrote:
    > I have a stored procedure that requires one variable to be filled:
    > WHERE ItemNo = @ItemNo
    > Instead of sending 1 value, I'd like to send a bunch of values.
    > I don't mind changing the SP if I new how to approach this.
    > The user would select any number of ItemNo's from a form and submit.
    > Assume ItemNo's like: B1, B2, B3, etc...
    > The end result would be something like ...
    > WHERE ItemNo = B1 or ItemNo = B5 or ItemNo = B10 ...etc....
    >


    This article details many alternatives:
    http://www.sommarskog.se/arrays-in-sql.html

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Nov 19, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?S2V2aW4gQnVydG9u?=

    Pre-Send Request Headers, Pre-Send Request Content

    =?Utf-8?B?S2V2aW4gQnVydG9u?=, Dec 31, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,090
    =?Utf-8?B?S2V2aW4gQnVydG9u?=
    Dec 31, 2004
  2. Schultz
    Replies:
    1
    Views:
    519
    Karl Seguin
    Feb 14, 2005
  3. Nathan Sokalski
    Replies:
    3
    Views:
    1,960
    Larry Lard
    Nov 23, 2005
  4. Chris Reay

    Does Socket.send send all bytes?

    Chris Reay, Nov 3, 2003, in forum: Ruby
    Replies:
    2
    Views:
    227
    Chris Reay
    Nov 4, 2003
  5. Patrick
    Replies:
    5
    Views:
    614
    Brian McCauley
    May 3, 2006
Loading...

Share This Page