Results 1 to 2 of 2

Thread: Passing Arrays to Stored Procedures

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    Landskrona, Sweden
    Posts
    7
    I don't think that there is any way to pass an array into a stored procedure. I would have joined the array into a string using the Join-function and then splitting it up again in the sp using the charindex-function.

    Maybe it's the way you have done it today?

    Magnus

  2. #2
    Member
    Join Date
    Aug 2000
    Posts
    51
    You can pass an array of values to a stored prodedure.

    For example, if you had the stored procedure:

    CREATE PROCEDURE [test_del]
    @HeaderNumber int,
    @LineItemNumber int
    as
    delete from testlineitem where headernumber = @HeaderNumber and LineItemNumber = @LineItemNumber

    You could use:

    cmd.execute , array(1,2)

    To delete a line item record with a header number of 1 and a line item number of 2.





Posting Permissions

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



Click Here to Expand Forum to Full Width