In C# the answer is
for stored proc like :
-----------------
Create Procedure SelectById
(
@ID int
)
AS
Select * from MyTable Where [ID] = @ID
----------------
the code would be:
string connectionString = "" // Put connection string here
using (SqlConnection conn = new SqlConnection(connectionString)){
using(SqlCommand sqlcom = new SqlCommand("SelectById",conn)){
sqlcom.CommandType = CommandType.StoredProcedure;
sqlcom.Parameters.Add("@ID",SqlDbType.Int).Value = 1; //the value to
pass in
SqlDataReader reader = sqlcom.ExecuteReader();
//Do something here with results
}
}
HTH - SharpDevelop and convert C# to VB.NET
Ciaran O'Donnell
"Satheesh Kumar" wrote:
how to insert values into stored procedure....
using vb.net application....
if any one knows send me the sample code... for that insert query