N
Newbie
Could someone please tell me how or if the following is possible. I
have created a small test database and have opened one connection, one
DataAdapter, and one Dataset for it in my vb.net (ado.net) program. I
am able to Navigate through the dataset ie: MoveNext, MoveFirst,
MovePrev, MoveLast by just keeping track of my record position. I can
Add,Delete,Update Records etc by using the CommandBuilder
ie: Dim cb As New OleDb.OleDbCommandBuilder(daUsers)
Now I would Like to add a search feature using two non primary key
fields. I have been able to search for a specific record using the
dataview.find() method but from everything I could find this will only
work on one specified field. From what I have found on the web first
you sort the dataview.sort("LastName") then call the find method
dataview.find("smith"), this works for a single field only. The
problem I am having is I would like to be able to sort by multiple
fields ie: dataview.find("smith","bob") Is there a way to do that?
I have read that the dataview does not require the sort field/fields to
be a primary key field like the datarow.find requires, but I still have
not found a way to do it.
Also, back in the day's of VB version 6, I was able to use sql to
accomplish what I'm now trying to do on one recordset. ie: "SELECT *
FROM Address WHERE FirstName = "Bob" AND LastName = "Smith". You were
able to execute all kinds of query's on the same recordset. Is there
a way to do this on a vb.net dataset.
Thanks
Dave LaPorte.
have created a small test database and have opened one connection, one
DataAdapter, and one Dataset for it in my vb.net (ado.net) program. I
am able to Navigate through the dataset ie: MoveNext, MoveFirst,
MovePrev, MoveLast by just keeping track of my record position. I can
Add,Delete,Update Records etc by using the CommandBuilder
ie: Dim cb As New OleDb.OleDbCommandBuilder(daUsers)
Now I would Like to add a search feature using two non primary key
fields. I have been able to search for a specific record using the
dataview.find() method but from everything I could find this will only
work on one specified field. From what I have found on the web first
you sort the dataview.sort("LastName") then call the find method
dataview.find("smith"), this works for a single field only. The
problem I am having is I would like to be able to sort by multiple
fields ie: dataview.find("smith","bob") Is there a way to do that?
I have read that the dataview does not require the sort field/fields to
be a primary key field like the datarow.find requires, but I still have
not found a way to do it.
Also, back in the day's of VB version 6, I was able to use sql to
accomplish what I'm now trying to do on one recordset. ie: "SELECT *
FROM Address WHERE FirstName = "Bob" AND LastName = "Smith". You were
able to execute all kinds of query's on the same recordset. Is there
a way to do this on a vb.net dataset.
Thanks
Dave LaPorte.