ADO
Hi:
I have a VC++6 dll(app wizard, sopporting MFC)
with the following errros:
....msado15.tlh(214) : error C2011:'LockTypeEnum' : 'enum' type redefinition
....msado15.tlh(214) : error C2011: 'DataTypeEnum' : 'enum' type redefinition
....msado15.tlh(258) : error C2011: 'FieldAttributeEnum' : 'enum' type
redefinition
....msado15.tlh(279) : error C2011: 'EditModeEnum' : 'enum' type redefinition
....msado15.tlh(287) : error C2011: 'RecordStatusEnum' : 'enum' type
redefinition
....msado15.tlh(407) : warning C4146: unary minus operator applied to
unsigned type, result still unsigned
....msado15.tlh(531) : error C2011: 'ParameterDirectionEnum' : 'enum' type
redefinition
....MyFile.cpp(102) : error C2065: 'adLockBatchOptimistic' : undeclared
identifier
--------------------------
Among other things, on top of the form I have:
#import "C:\\Program Files\\Common Files\\System\\ado\\msado15.dll" rename
("EOF","adoEOF") no_namespace
#define CREATEiNSTANCE(sp,riid) { HRESULT _hr =sp .CreateInstance( __uuidof(
riid ) ); \
if (FAILED(_hr)) _com_issue_error(_hr); }
#define RsITEM(rs,x) rs->Fields->Item[_variant_t(x)]->Value
#define UC (char *)
struct InitOle {
InitOle() { ::CoInitialize(NULL); }
~InitOle() { ::CoUninitialize(); }
} _init_InitOle_; // Global Instance to force load/unload of OLE
---
The idea is to open a recordset, connected to SQL SERVER 2000.
--
Rick