Hi all
Simple question - I need to know how to filter the data in a dataset. For example in VB6 I would have retrieved the data in a recordset and then filtered using
rs.filter = " surname like '" & txtsurname.txt & "%'"
and then updated the bound grid using
flxCustomers.refresh()
In VB.net I've created a dataset and attempted the following without success
Private Sub txtName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtName.TextChanged
dsCustomers.Tables("CustomerDetails"
.Select(" surname like '" & txtName.Text & "%'"
dgCustomers.Refresh()
End Sub
I'm not sure if this is the correct method - but it's the only information that I've managed to locate in MSDN. What I'm trying to do is move my vb6 app into .net - and as an experient changing all ADO references to ADO.net. In my current VB6 app I had set up a grid that could be filtered as the user typed into the textbox by firing the textchanged method.
If this does not make sense - let me know and I'll try to explain it better. Any help would be appreciated.
OM
Simple question - I need to know how to filter the data in a dataset. For example in VB6 I would have retrieved the data in a recordset and then filtered using
rs.filter = " surname like '" & txtsurname.txt & "%'"
and then updated the bound grid using
flxCustomers.refresh()
In VB.net I've created a dataset and attempted the following without success
Private Sub txtName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtName.TextChanged
dsCustomers.Tables("CustomerDetails"
dgCustomers.Refresh()
End Sub
I'm not sure if this is the correct method - but it's the only information that I've managed to locate in MSDN. What I'm trying to do is move my vb6 app into .net - and as an experient changing all ADO references to ADO.net. In my current VB6 app I had set up a grid that could be filtered as the user typed into the textbox by firing the textchanged method.
If this does not make sense - let me know and I'll try to explain it better. Any help would be appreciated.
OM