Plz;
I hav a Table named EMP in SQL Server and hav two textboxes getting empid and empname. I want to insert the empid and empname from taxtboxes into SQL Table and at the same time that empid and empname want to show in datagridview when i click the button. i use the following code which inserts the record in SQL table but plz help me to show in datagridview.
Regards
cmd.Connection = con
cmd.CommandText = "INSERT INTO EMP(empid,empName) VALUES('" & TextBox1.Text & "', '" & TextBox2.Text & "')"
cmd.ExecuteNonQuery()
MsgBox("Record Added")