Return to Snippet

Revision: 4747
at January 18, 2008 23:51 by ixia


Initial Code
public void LogRequest(string requestor, string messageBody)
        {
            using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString))
            {
                conn.Open();
                SqlCommand cmd = new SqlCommand("wp_InsertRequest", conn);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.Add(new SqlParameter("Requestor", requestor));
                cmd.Parameters.Add(new SqlParameter("EmailBody", messageBody));
                cmd.ExecuteNonQuery();
            }
        }

Initial URL

                                

Initial Description

                                

Initial Title
Simple insert SPROC call

Initial Tags

                                

Initial Language
C#