Question

Locked

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 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

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

This might help.

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

http://msdn.microsoft.com/en-us/vbasic/default.aspx

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 ...

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.

Back to Windows Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums