how to add sql statement in databinding?, vb 2005

wongth7

Member
Joined
Jun 16, 2009
Messages
7
Programming Experience
Beginner
hi guys..can u tell me how to add sql statement in my code

here's my code for the form load..

VB.NET:
Private Sub frmManager_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
     'TODO: This line of code loads data into the 'UserDataSet2.Staffapplication' table. You can move, or remove it, as needed.
     Me.StaffapplicationTableAdapter.Fill(Me.UserDataSet2.Staffapplication)

     txtRecordno.DataBindings.Add("Text", UserDataSet2, "Staffapplication.Srecordno")
     txtUsername.DataBindings.Add("Text", UserDataSet2, "Staffapplication.Sname")
     txtPassword.DataBindings.Add("Text", UserDataSet2, "Staffapplication.Spassword")
     txtHobby.DataBindings.Add("Text", UserDataSet2, "Staffapplication.Shobby")

 End Sub

i want those textboxes to displayed only data for a particular person
something like

"Select * from Staffapplication where MID ='" & frmLeave.txtUser.Text & "'")


how to add the sql statement in my code??



here's my form...
 

Attachments

  • testing.JPG
    testing.JPG
    14.4 KB · Views: 17
Back
Top