How to execute a stored procedure.and how to call it form a
asp page
Answer Posted / ramesh
This u cn run in sql server
"execute SP_Name Parameter1,Parameter2,..."
Dim SQLDBDataReader As SqlClient.SqlDataReader
Dim SQLDataTable As New DataTable
SQLCmd.CommandText = "GetAuthors"
SQLCmd.CommandType = CommandType.StoredProcedure
SQLCmd.Connection = SQLCon
SQLCmd.Parameters.Add(New SqlClient.SqlParameter
("AuthorName", SqlDbType.VarChar, 100,
ParameterDirection.Input, False, 30, 0, "",
DataRowVersion.Current, "Y%")) SQLDBDataReader =
SQLCmd.ExecuteReader() SQLDataTable.Columns.Add
("AuthorName", GetType(Int32), "") SQLDataTable.Columns.Add
("AuthorLocation", GetType(String), "")
Dim FieldValues(1) As Object 'A Temporary Variable to
retrieve all columns in a row and fill them in Object array
While (SQLDBDataReader.Read)
SQLDBDataReader.GetValues(FieldValues)
SQLDataTable.Rows.Add(FieldValues)
End While
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
I have an external link in my application say www.xyztest.com. Today this site works on http protocal. Tommorow it may run on https. So i cant hardcore the protocal in the site. When a user clicks on the link how can i know if the external site works on http or https and takes him to that place?
What's the use of formatters in .net?
What are the different types of validation controls in asp.net?
How can you send an email message from an asp.net web page?
Can we have multiple master pages in asp net?
What are the various types of cookies in asp.net?
How can you register a custom server control to a web page?
What is is post back property in asp net?
Explain the difference between Repeater and Data list control in ASP.NET?
I want to connect a system in LAN and I want to access that. Whenever I am moving a mouse in my desktop, the similar thing has to happen in another system in which I have connected. I need coding for this in C# and ASP.NET Can anyone please help me. It is very urgent. Thanks in advance. My email id is manojkumarchallagundla@gmail.com Will you please?
What is viewstategenerator?
How to find out what version of asp.net I am using on my machine?
What are sql notifications and sql invalidations?
Explain Areas in MVC?
How to count the number of objects present in a web page? How to count the number of radio buttons in a web page?