![]() | |
| | #1 |
| Младенец Join Date: Apr 2006 Location: Mauritius
Posts: 12
Rep Power: 0 Reputation:
10 | C++ Builder 6 - Database Search Hi, I have a table called event in my database. I have 2 fields called Event_Id and Project_Id. I want to search the table to find out if there's event_id=27 for a project_id. Kind Regards, Rowin |
| | |
| | #2 |
| Младенец Join Date: Mar 2006 Location: Yerevan
Posts: 20
Rep Power: 0 Reputation:
10 | Re: C++ Builder 6 - Database Search CDatabase* pDatabase ; ... ... CRecordset m_rs (pDatabase); m_rs.Open(AFX_DB_USE_DEFAULT_TYPE, "select project_id from table_name where event_id = 27", NULL); or m_rs.Open(); m_rs.m_strFilter = "event_id = 27"; m_rs.Requery(); CDBVariant varValue; while(!m_rs.IsEOF()) { m_rs.GetFieldValue(2/*2 is column*/, varValue ); ... //cout << varValue.m_lVal; ... m_rs.MoveNext(); } Last edited by tiko_www : May 2, 2006 at 14:11. |
| | |
| | #3 |
| Грустно... | Re: C++ Builder 6 - Database Search Not sure how MFC fits inside BCB, but whatever
__________________ http://аvitya.livejournal.com Хотели, как лучше, а получилось даже хуже... Лозунг шахматиста: На каждый шах - ответим матом! |
| | |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Download Free Ebooks (Computers, Physics, Math and more) | acid | TWARM | 220 | Jul 28, 2008 04:16 |
| C++ Builder 6 - DateTimePicker | Rowin | C/C++ | 2 | May 2, 2006 04:22 |
| C++ Builder 6 and Crystal Report | Rowin | C/C++ | 13 | Apr 28, 2006 12:25 |
| Inspiration, imitation or innovation - how do designers create unique identities? | aramx | Web sites | 1 | Jan 16, 2006 13:45 |
| SQL Database administrator/ web developer | {I} | Jobs | 0 | Aug 25, 2005 09:18 |