forum

Home / DeveloperSection / Forums / ExecuteNonQuery: Connection property has not been initialized.

ExecuteNonQuery: Connection property has not been initialized.

Tarun Kumar 1682 23-Feb-2016
I am getting error "ExecuteNonQuery: Connection property has not been initialized." while executing command in C#.

SqlCommand cmd = new SqlCommand();
                cmd.CommandText = "My Insert Query";
                cmd.ExecuteNonQuery();

Please help


c# c#  .net  sql server  sql 
Updated on 23-Feb-2016

Can you answer this question?


Answer

1 Answers

Liked By