Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (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 by bkedersha
Posted
You have to use ADO.NET or extra framework (like Enterprise Library - Data Application Block). Look for tutorials in internet.

A man and a dog have an average of three legs.

Beaware of Statistics.

Posted

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()

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)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...