now a days I am using visual basic 2013 front end and sql sever back end
I want that when I enter custID on vb form in a textbox and press enter all the relevant record of the entered cutID get display on the respective textbox. Please do help me sen code on my email is hrjafri@msn.com
I am using the following code:-
Private Sub txtCno_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtCNo.KeyDownIf e.KeyCode = Keys.Enter Then
cn.Open()
Dim cmd As New SqlCommand("SELET * FROM course WHERE cno=" & Val(txtCNo.Text))
cmd.ExecuteNonQuery()
cn.Close()
txtCNo.Text = ""
txtName.Text = ""
txtNoDay.Text = ""
End If
End Sub