Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
How to create stored procedure , i want show some select table columns in datagrid, that datagrid show based on field column dynamically select field column.
Posted

SQL
Create Procedure ProcedureName
as
Begin
Select * From TableName
End
 
Share this answer
 
In Database:
SQL
Create Procedure ProcedureName
as
Begin
Select * From TableName
End



In Front End

SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = new SqlCommand("ProcedureName", con);
DataSet ds = new DataSet();
da.Fill(ds, "result_name");
DataTable table = ds.Tables["result_name"];
return table



HOPE ITS CLEAR
 
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