this is my coding i run no error message but the data is not inserted in the table. i need help what is error in this program
Dim MyConnection As New SqlClient.SqlConnection
Dim MyCommand As New SqlCommand
Dim connstring As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Documentcreation.mdf;Integrated Security=True;User Instance=True"
Dim insstr As String = ""
Dim disp As Integer
MyConnection.ConnectionString = connstring
MyCommand.Connection = MyConnection
Dim rs As Date = Today
If MyConnection.State = ConnectionState.Open Then
MyCommand = New SqlCommand("insert into prak values (2,'" & txtdevelopercode.Text & "')", MyConnection)
disp = MyCommand.ExecuteNonQuery()