How to execute a stored procedure.and how to call it form a
asp page

Answers were Sorted based on User's Feedback



How to execute a stored procedure.and how to call it form a asp page..

Answer / 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

How to execute a stored procedure.and how to call it form a asp page..

Answer / sdfsd

exec storedprocedure parameter
sqlhelper cs=new sqlhelper();
cs.parameter.add("name",type).value=value
cs.execD

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What does this do? sn -t foo.dll

3 Answers  


HI, I have a very important query in mind. Please help me regarding this. I don't have any real time exp in .net. But I have a knowledge it .net. I got an offer from an MNC company as a software developer has I had kept 2 years of fake exp. Even though for this job I had worked hard to crack interview for more then a year. So, I would like to know how difficult it will be for working in real time as I don't have real time exp. Please tell me as soon as possible bcoz I need to join by next month. Can i sustain over there for a longer time or not. And also let me know how to work pressure will be over there. Please help me regarding this. I'm getting tension thinking about it. Thank you.

1 Answers   CTS,


RequiredFieldValidator--write code in javascript

3 Answers   Wipro,


What is the recommended approach for asp.net mvc to globally intercept exceptions? What other functionality can be implemented with the approach? : Asp.Net MVC

0 Answers  


write six HTTP request method?

4 Answers   IBM,


What is mvc in angular?

0 Answers  


Is it true that a Web service must be written in .NET or not?

0 Answers   Siebel,


Singleton Design pattern?How do you achieve it?

3 Answers   Microsoft,


What is difference between ASP and ASP.NET ?

3 Answers   TCS,


What is a multilingual website?

0 Answers  


Why asp.net is better than php?

0 Answers  


What is redirecting behavior?

0 Answers  


Categories