Code. Collaborate. Organize.
No Limits. Try it Today.
"ExecuteNonQuery: CommandText property has not been initialized".
public partial class Form1 : Form
private void button1_Click(object sender, EventArgs e)
string conn = "Data Source=.;Initial Catalog=LearningSP;Integrated Security=True";
SqlConnection con = new SqlConnection(conn);
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = con;
cmd.CommandText = "sampleproc";
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)