Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2009
    Posts
    18

    Unanswered: return multiple rows

    i try get multiple values from stored procedure, but i get a error that are more than one values.

    i will fill a combobox.

    in the stored procedures i have:
    select name
    into param1
    from clients


    what can i do?

  2. #2
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    select name
    into param1
    from clients
    You are trying to store multiple values (actually tuples) into a single variable here.
    How do you think that is going to work?

    What exactly are you trying to return from your stored procedure?

  3. #3
    Join Date
    Nov 2009
    Posts
    18
    Quote Originally Posted by shammat View Post
    You are trying to store multiple values (actually tuples) into a single variable here.
    How do you think that is going to work?

    What exactly are you trying to return from your stored procedure?
    i try select all names from the table clients.

    than in c#, i try fill a combobox with that data.

  4. #4
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    you will need to create a cursor and loop through each of the results from the query and put them in one by one into the combobox with the data.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

  5. #5
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    Quote Originally Posted by tchiloh View Post
    i try select all names from the table clients.

    than in c#, i try fill a combobox with that data.
    Why do you think you need a stored procedure for that?

    That sounds like a trivial case of running a SELECT in C# and processing the result set (as it-iss.com has said as well)

Posting Permissions

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