Hai to all
I wish to know how to connect the Stored Procedure(SQL Server) with ASP.net.
Hai to all
I wish to know how to connect the Stored Procedure(SQL Server) with ASP.net.
Please read ADO.NEt book before asking such simple questions...
here are few tutorials that might help...
http://www.exforsys.com/content/category/17/221/266/
http://www.exforsys.com/content/category/17/270/356/
http://www.exforsys.com/content/category/17/269/354/
I am giving an example to use a stored procedure in ASP.NET.
Assume that I have written a SELECT command in a STORED PROCEDURE. By using DataAdapter in ASP.NET I want to display the data from the database table on to the datagrid.
SqlConnection con=new SqlConnection(write servername,database name,uid,pwd);
SqlDataAdapter cmd=new SqlDataAdapter("records",con);
cmd.SelectCommand.CommandType=CommandType.StoredProcedure;
Where "records" is a StoredProcedure.