bkedersha Posted August 24, 2005 Posted August 24, 2005 (edited) Running a stored procedure in SQL Server 2000 I created a new stored procedure in SQL Server 2000. How do I get ASP.Net to run one or many stored procedures when a user clicks on a button? :confused: :confused: Edited August 24, 2005 by bkedersha Quote
hrabia Posted August 25, 2005 Posted August 25, 2005 You have to use ADO.NET or extra framework (like Enterprise Library - Data Application Block). Look for tutorials in internet. Quote A man and a dog have an average of three legs. Beaware of Statistics.
mike55 Posted August 25, 2005 Posted August 25, 2005 Here is an example: dim cmdLogin as new sqlCommand 'Sets the cmdLogin to a new instance and the type of Stored procedure. cmdLogin = New SqlCommand("<<procedureName>>", cnConn) cmdLogin.CommandType = CommandType.StoredProcedure 'Add your parameters cmdLogin.Parameters.Add(New SqlParameter("@UserEmail", SqlDbType.NVarChar, 254)) cmdLogin.Parameters("@UserEmail").Direction = ParameterDirection.Output cmdLogin.Parameters("@UserEmail").Value = UserEmail 'Call the execute statement. cmdLogin.ExecuteNonQuery() Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.