Ado.net Century Problem for All Can you return 10 result set and show it in one table ? Answer : ??
hi Everyone :
i have 2 problems :
1- Returing Multiple Result to one table
2- calling stored procedure multiple time with differernt value
both problem connected to each other i will show yo how >>>
developing tool : VS2005 C#
database tool : sql server 2005
database has :
entry : table name
( all below cols in one table entry )
main_name : sold item
cost : cost of item
daydate : the date of selling
What i want ?
i want my datagridview to reutrn this results from store procedure :
Year Year Year
item 2007 2006 2008
------------------------------------------
cds 430$ 500$ 100$
Dvds 1000$ 200$ 600$
i am able to show one result at a time using this query :
select main_item , sum (cost ) form entry where datepart(yyyy,daydate) = @passyear
group by main_item
but if i try to show multiple selecte quere only one result is shown in datagrideview :
i tryed all possiblity like to solve this issus :
-dataReader.NextRow(); useless
-Union ; freak
-dataset with different table ugly way if i have 12 result then createing 12 table is painfull ; true
12 hours of searching no use no one give even 10 % of the soultion could you please help me
Hope to hear form you soon ...
thanks in advance guys ...
cszaidan