How to execute a stored procedure.and how to call it form a
asp page
Answers were Sorted based on User's Feedback
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 |
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 |
Define repository pattern in mvc.net? : asp.net mvc
Compare and contrast between inline and code behind - which one is best?
What is session in asp.net?
Where code pages are used?
Can we throw exception from catch Block?
Do you know caching feature?
How Session outproc in Sqlserver stored?
what is session ?how sessions are handeled in application? write the clauses of sql server in their order.
What's the difference between Page.RegisterClientScriptBlock and Page.RegisterStartupScript ?
Dategrid filtering and sorting How can we sort all the fields at once?
How to retrieve data row by row from a DataTable? Thanks In advance PriyaPP
What are different transaction options?