hi all,
I have a Procedure:
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Value Of @Col is :
''AS [Sec5],''AS [Sec7],''AS [Sec8],''AS [Sec9],''AS [Sec11]
and output is:
		
		
	
	
I want exactly this output in C#.So I set on Datasource of Datagridview but My grid no any record.
why?
please help me
	
		
			
		
		
	
				
			I have a Procedure:
			
				C#:
			
		
		
		ALTER Procedure [dbo].[Teeeest] As
Declare    @Cols    varchar(max),
           @Sql     varchar(max)
Set @Cols=stuff((Select ',''''AS ' + quotename(Sec_Name)--+',''''AS '+quotename(Sec_Code)
                              From Tb_Section
                             Where    Sec_Base    = 1
                            For xml path('')), 1, 1, '');
Set @Sql    = 'Select Sec_Name,'                        
                     + @Cols 
                 + 'From   Tb_Section Where Sec_Base = 0 Order by Sec_Name'                            
exec (@Sql)Value Of @Col is :
''AS [Sec5],''AS [Sec7],''AS [Sec8],''AS [Sec9],''AS [Sec11]
and output is:

I want exactly this output in C#.So I set on Datasource of Datagridview but My grid no any record.
why?
please help me
 
	 
 
		