Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i want to pass an id from silverlight-enable web service, and then inside the web service need to connect to sql-server, retrieve data from db, the data if a multiple value, might need to use array list or list to pass back to web form, anyone can gv me sample code , or project to me, i am using vb language.
Posted

what i did here is create the array in sql server.

example
Table name : #tblInvoiceNumber

INV_NO
row1
row2
row3

I convert this in to a columnar with comma dilimeted to result it in 1 column

This is used to make it comma delimited
SQL
while @int_min <= @int_max
    begin

            select @var_InvoiceNumber = isnull(INV_NO,'') from #tblInvoiceNumber where ID = @int_min

            if(isnull(@var_InvoiceNumber,'')<>'' )
                begin
                        set @out_InvoiceNo = @var_InvoiceNumber + ',' +  @out_InvoiceNo
                end

            set @int_min = @int_min + 1


    end

select @out_InvoiceNo as out_InvoiceNo
 
Share this answer
 
This[^] step by step article could help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900