I have written this code in visual basic. On executing no error is printed but the new row is not added to the database. I have tried using datasets also but that didnt work either. Any ideas?
Dim conSQL As SqlConnection = New SqlConnection
conSQL.ConnectionString = "Data Source=USER-PC\SQLEXPRESS;Initial Catalog=Phd;Integrated Security=True"
conSQL.Open()
Dim cmd As New SqlCommand("Insert into Phd_Student(student_id,student_name,student_email) values ('" + idnotextbox.Text + "','" + studnametextbox.Text + "','" + studemailtextbox.Text + "')" , conSQL)
cmd.ExecuteNonQuery()