Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB in visual c++

Status
Not open for further replies.

Timmm

Technical User
Mar 5, 2003
2
BE
hi,

i have made a DB in access, and made a simple Employee example of databases. but it has a navigationbutton that i have to push to get the next data.
i'm searching the sourcecode to trigger that (to update automatecly) so when i give in the data(ID)in the editbox it automatecly searches in the database and gives me back the name of the Employee.

Thanks in advance,
Tim
 
In the CRecordset there is a variable called

m_strFilter

Intialise this before using the open method.

i.e.

CEmpRst (NULL) or CEmpRst(&db)

rst.m_strFilter.Format("ID = '%d'", nID);
rst.Open();

This will only retrieve records that match the ID

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top