type redefinition Error after Import ADO in vc++

It is important to invoke ADO correctly in your program, or you can have compiler errors. The following code demonstrates the correct way to use #import with Msado10.dll the MSADO15.dll:

#import <msado15.dll>
no_namespace
rename("EOF", "adoEOF")

error C2011: ‘EditModeEnum’ : ‘enum’ type redefinition
error C2011: ‘LockTypeEnum’ : ‘enum’ type redefinition
error C2011: ‘FieldAttributeEnum’ : ‘enum’ type redefinition
error C2011: ‘DataTypeEnum’ : ‘enum’ type redefinition
error C2011: ‘ParameterDirectionEnum’ : ‘enum’ type redefinition
error C2011: ‘RecordStatusEnum’ : ‘enum’ type redefinition

Here’s the original solution in MSDN:
http://support.microsoft.com/kb/169496/EN-US/

Leave a Reply

Your email address will not be published. Required fields are marked *