I am attempting to bind the output of a TSQL procedure (that takes 1 parameter) to a ListBox on a windows form. I had thought this may be easy, but have come to a dead end after searching for hours on this.
So in simple, I have a TSQL procedure (let's call it GET_DATA) and it takes a single parameter (say @recordId) and it returns 2 columns (name & Identifier). Now I wish to have a List Box populated so that it displays the name field and has the Identifier field as the valueMember for all the records returned from the GET_DATA procedure.
I normally program using ASP.NET and to do essentially the same thing is quite easy using a dataReader. However I have come to realise that data readers just arn't the way to go when working with windows forms.
So any help on achieving this would be GREATLY appriciated.
Thanks

Binding TSQL Procedure to ListBox
miguelagg
You would have to use the datacommand to fill a dataset instead of a datareader. Here is an example from my website which I think will help.
http://www.vb-tips.com/default.aspx ID=79afdb6a-611d-43cd-9186-def86a1baeef
Ken