williegofar
Programmer
Hi,
I've got a class in a DLL that has 4 constructors.
LINK_TO_DLL CDBF_OpenTable(
CDaoDatabase *_ciDaoDatabase,
CString _SQLString,
BOOL _ShowMessage = TRUE
);
LINK_TO_DLL CDBF_OpenTable(
CDaoDatabase *_ciDaoDatabase,
CString _SQLString,
CString _FieldName,
CString *_FieldText,
BOOL _ShowMessage = TRUE
);
LINK_TO_DLL CDBF_OpenTable(
CDaoDatabase *_ciDaoDatabase,
CString _Table,
LONG _ID,
BOOL _ShowMessage = TRUE
);
LINK_TO_DLL CDBF_OpenTable(
CDaoDatabase *_ciDaoDatabase,
CString _Table,
LONG _ID,
CString _FieldName,
CString *_FieldText,
BOOL _ShowMessage = TRUE
);
I've created a new class
class CReadTeam : public CDBF_OpenTable {
..... };
The constructor for this is;
CReadTeam::CReadTeam( CString _SQL_String )
: CDBF_OpenTable( &g_ciDaoDatabase, _SQL_String )
where g_ciDaoDatabase is a global variable.
The compiler is returning the following error message;
error C2512: 'CDBF_OpenTable' : no appropriate default constructor available
I can't understand why it doesn't realise that I am referring to the first constructor.
Would be grateful for any help. Thanks.
I've got a class in a DLL that has 4 constructors.
LINK_TO_DLL CDBF_OpenTable(
CDaoDatabase *_ciDaoDatabase,
CString _SQLString,
BOOL _ShowMessage = TRUE
);
LINK_TO_DLL CDBF_OpenTable(
CDaoDatabase *_ciDaoDatabase,
CString _SQLString,
CString _FieldName,
CString *_FieldText,
BOOL _ShowMessage = TRUE
);
LINK_TO_DLL CDBF_OpenTable(
CDaoDatabase *_ciDaoDatabase,
CString _Table,
LONG _ID,
BOOL _ShowMessage = TRUE
);
LINK_TO_DLL CDBF_OpenTable(
CDaoDatabase *_ciDaoDatabase,
CString _Table,
LONG _ID,
CString _FieldName,
CString *_FieldText,
BOOL _ShowMessage = TRUE
);
I've created a new class
class CReadTeam : public CDBF_OpenTable {
..... };
The constructor for this is;
CReadTeam::CReadTeam( CString _SQL_String )
: CDBF_OpenTable( &g_ciDaoDatabase, _SQL_String )
where g_ciDaoDatabase is a global variable.
The compiler is returning the following error message;
error C2512: 'CDBF_OpenTable' : no appropriate default constructor available
I can't understand why it doesn't realise that I am referring to the first constructor.
Would be grateful for any help. Thanks.