Hi,
"Tim Sprout" <tm**@ptialaska.netwrote in message
news:Oj**************@TK2MSFTNGP05.phx.gbl...
How do I take a query like:
"string strOleDb = "Select * from ProjectTable WHERE ID = 4";
and pass in an integer variable for the ID, instead of the literal 4?
Replace with the correct classes:
using (SqlConnection con = new
SqlConnection(ConfigOptions.ConnectionString))
{
con.Open();
using (SqlCommand com = new SqlCommand())
{
com.CommandText = "InsertOffer";
com.CommandType = CommandType.StoredProcedure;
com.Connection = con;
com.Parameters.Add("@offerID", SqlDbType.Int).Value =
offerId;
com.ExecuteNonQuery();
}
}