SqlConnection cnn = new SqlConnection();
cnn.ConnectionString = ConfigurationManager.ConnectionStrings["supermarket_webConnectionString"].ConnectionString;
SqlConnection objConnect = cnn;
SqlCommand cmd = new SqlCommand("p_NewpurchaseOrder", objConnect);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parXmlPurchaseItems = new SqlParameter("@xml_OrderPurchItems", SqlDbType.VarChar);
parXmlPurchaseItems.Value = XmlPurchaseOrderItems;
cmd.Parameters.Add(parXmlPurchaseItems);
cmd.ExecuteNonQuery();
Loading

Ramesh MaruthiRank #937 · 2.2K reputationPosted Sep 10, 2014, 7:07 AM EDT
try this code
Nitesh KejriwalRank #253 · 9.9K reputationPosted Sep 10, 2014, 8:01 AM EDT
Jignesh TrivediRank #16 · 50.3K reputationPosted Sep 10, 2014, 8:08 PM EDT
Are you getting any run time error?
just want to add open the connection before use it.
cnn.Open();
hope this will help you.
Valarmathi33 reputationPosted Aug 24, 2015, 10:25 PM EDT