Where doI find possible answer to my question

By kellygidiglo ·
I sent a question of difficulty in finding specific records from an MsAccess database using windows form as a front end.
This is the code am trying to use.

Dim staffrecord As DataRow
dt = DsStaffInfo.Tables("StaffInfo")
Dim theId As String
theId = txtFind.Text
staffrecord = dt.Rows.Find(theId)

Will someone please help me out

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

This might help.

by seanferd In reply to Where doI find possible a ...

That is full of education and code samples, just look around.

I don't write code, so I can't help much.

Collapse -

MSDN article here

by Tony Hopkinson In reply to Where doI find possible a ...

Google is your friend, .Rows.Find instantly found the above.

NB .net uses disconnected datasets. So this find is operating on the data in access at the time it reads.

It doesn't go back to the database, to get the latest data, unless you 'refresh' the query. Personally I'd do that at the point you execute the find routine or better yet use txtFind.Text as the parameter in a query designed to just return the matches instead of sucking the entire table down on to your client to then get it from there.

Related Discussions

Related Forums