becool20082008
Member
- Joined
- Sep 16, 2009
- Messages
- 5
- Programming Experience
- 1-3
hi i'm using vs 2005 vb.net language windows application i have a database MS Access connected to datagridview and i have button that when press it opens another window that contains 9 textboxes. i want when i select a customer from datagridview and press the button to retrieve each field to a textbox i started with this code and i get stucked.
Public Sub LoadData(ByVal ds As DataSet)
Dim dbconnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "data source=C:\Users\Haidar\Desktop\customer list\New Farahnet\FarahnetCustomers.mdb"
Dim customersDataSet As New DataSet()
Me.TextBox1.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Fname"))
Me.TextBox2.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Lname"))
Me.TextBox3.DataBindings.Add(New Binding("Text", customersDataSet, "customers.IP"))
Me.TextBox4.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Telephone"))
Me.TextBox5.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Email"))
Me.TextBox6.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Location"))
Me.TextBox7.DataBindings.Add(New Binding("Text", customersDataSet, "customers.TypeofConnection"))
Me.TextBox8.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Download"))
Me.TextBox9.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Upload"))
End Sub
please any one can help
Public Sub LoadData(ByVal ds As DataSet)
Dim dbconnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "data source=C:\Users\Haidar\Desktop\customer list\New Farahnet\FarahnetCustomers.mdb"
Dim customersDataSet As New DataSet()
Me.TextBox1.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Fname"))
Me.TextBox2.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Lname"))
Me.TextBox3.DataBindings.Add(New Binding("Text", customersDataSet, "customers.IP"))
Me.TextBox4.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Telephone"))
Me.TextBox5.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Email"))
Me.TextBox6.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Location"))
Me.TextBox7.DataBindings.Add(New Binding("Text", customersDataSet, "customers.TypeofConnection"))
Me.TextBox8.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Download"))
Me.TextBox9.DataBindings.Add(New Binding("Text", customersDataSet, "customers.Upload"))
End Sub
please any one can help