|
Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006
[Question] to establish the record set on VC I created a test project
MFC works in a building APPWIZARD choose not to use the database to check documents to support this
Works entitled TEST
ODBC also linked with the corresponding database on the corresponding table TEST (two field on the table)
So codes have an TESTSET months. H and TESTSET. CPP2 documents
Lane, I took on the project two single text input (EDIT BOX), corresponding to two variables
M_num long -
M_name char -
This is the realization of the two operations showed Table TEST Media is a Message text input and the corresponding field (tables and field types and m_num m_name he gathers, and the table on a record)
Now all variables and design of the project, did not know how to set record
I said, the book has a category with a CRECORDSET function OPEN
Virtual BOOL Open (UINT nOpenType = AFX_DB_USE_DEFAULT_TYPE, LPCTSTR lpszSQL = NULL, DWORD dwOptions = none);
First, I would like to add the constructor function CTESTVIEW kind of function, but not if
CTESTVIEW the constructor function following initial state
: : CTestView CTestView ()
CRecordView : (CTest3View : : IDD)
{
//{{AFX_DATA_INIT (CTest3View)
M_pSet = NULL;
M_name = _T ( "");
M_num = 0
//}}AFX_DATA_INIT
4003rd TODO : add construction code here
}
How can create add-record set, and when operating in the operation of this scale shows two TEST Media is a Message text input and the corresponding field (set records for the corresponding SQL select * from test)
Thank you first |
[Question] to establish the record set on VC Add a new category-type course, elections CRecordSet and then choose Data Sheet CRecordset
Lane then in the definition of the dialog box and calling it an example of the kind of Open function, and then we can roll records, storage of records Sets members of the current variable Olympic record! |
[Question] to establish the record set on VC : : CTest5View CTest5View ()
CRecordView : (CTest5View : : IDD)
{
//{{AFX_DATA_INIT (CTest5View)
//m_pSet = NULL;
M_pSet->;Open (AFX_DB_USE_DEFAULT_TYPE, "select * from test" CRecordset : : none);
M_aa = 0
M_dd = _T ( "");
//}}AFX_DATA_INIT
4003rd TODO : add construction code here
}
M_pSet->;Open (AFX_DB_USE_DEFAULT_TYPE, "select * from test" CRecordset : : none);
I wrote to the OPEN function? ?
How editing can no mistake, but that will jump out of an operational error reporting? ? |
| |