Private Sub btstfidcmb_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles btstfidcmb.SelectedIndexChanged Dim con As New SqlConnection("Data Source=ASHUTOSH-PC\SQLEXPRESS;Initial Catalog=Art Station Management System;Integrated Security=True") Dim com As SqlCommand Dim dr As SqlDataReader 'Dim s = CInt(btstfidcmb.Text) Try con.Open() Dim str As String str = "select * from StaffRegister where stfstaffid = '" & btstfidcmb.Text & "'" com = New SqlCommand(str, con) dr = com.ExecuteReader While dr.Read stfnametxt.Text = dr.GetString(1) stfmnametxt.Text = dr.GetString(2) stflnametxt.Text = dr.GetString(3) End While con.Close() Catch ex As SqlException MessageBox.Show(ex.Message) End Try End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)