here add this code to your project
Insert.CommandText = "INSERT INTO Employeetable(EmpId,EmpName,Salary,City) Values (@a,@b,@c,@d)";
Insert.connection= connection1;
Why write two lines?? here the easy way:
string st="INSERT INTO Employeetable(EmpId,EmpName,Salary,City) Values (@a,@b,@c,@d";
sql command insert= new sql command(st,connection1);
sql command insert = new sql command("INSERT INTO Employeetable(EmpId,EmpName,Salary,City) Values (@a,@b,@c,@d", connection1)
You must associate your command to the connection one way or other!!!
:)
for assistance on retrieving visit
sql express