Question Locked

Where doI find possible answer to my question

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I sent a question of difficulty in finding specific records from an MsAccess database using Vb.net 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

3 replies

by tony hopkinson

http://msdn.microsoft.com/en-us/library/y06xa2h1(VS.80).aspx

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.

This discussion is closed to new replies.