I have a winform (VB 08) with some datagridviews, databinded textboxes, etc ( Access 07 database ).
In the form I use this search I have some databinded textboxes, etc. After I changed my fill from this :
to this
these databinded objects stop functioning. What I mean is that those objects where changing values reflecting the current selected row in the datagridviews I have on the form. Now they will work the first time and that is it. Is it due to the dataadapter I created? The only change came from the different fill methods I use now.Can anyone help pls....? Thanks for the replies
In the form I use this search I have some databinded textboxes, etc. After I changed my fill from this :
VB.NET:
Me.AllServicesTableAdapter.search(Me.Database2DataSet.AllServices, search1, search2)
to this
VB.NET:
Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\Serverjde\jde\Database0.accdb;Persist Security Info=False;")
Dim search1 As String = Me.TextBox3.Text
Dim search2 As String = Me.TextBox1.Text
Try
conn.Open()
Dim da As OleDbDataAdapter = New OleDbDataAdapter("Select * from AllServices where 'search1' = '" & search2 & "'", conn)
Dim ds As Database2DataSet = New Database2DataSet
' fill dataset
da.Fill(ds, "AllServices")
' Attach DataSet to DataGrid
AllServicesDataGridView.DataSource = ds.Tables("AllServices")
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
these databinded objects stop functioning. What I mean is that those objects where changing values reflecting the current selected row in the datagridviews I have on the form. Now they will work the first time and that is it. Is it due to the dataadapter I created? The only change came from the different fill methods I use now.Can anyone help pls....? Thanks for the replies