Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

visual basic 2013 and sql server 2014

$
0
0

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.KeyDown
        If 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

Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>