How to write a stored procedure that gets the content present in the table to a data grid.
I need to get all information from the table to a data grid by using a stored procedure
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Mahesh ChandRank #1 · 393.4K reputationPosted Nov 27, 2006, 10:41 AM EST
Connect to the database using Server Explorer in Visual Studio, go to the database, expand it, click on Stored Procedures, Right click on Stored Procedures and select New Stored Procedure option. Then write your SQL statement and save it.
After that you execute SP as a SQL statement. Once you execute a SP, you will get data in a DataSet or DataReader and you can bind a DataSet using DataGrid.DataSource property.
See ADO.NET section for more details.
If you do not know how to create stored procedures, then use MSDN or SQL Books/Documentation to create SPs.