C++ importing and using ADO -
i have 2 short questions involving importing , using ado in c++ project. not experienced ado in form.
first, time being database aspect of program need run on windows. enough test if _win32 or _win64 defined before running ado specific code, or there better approaches? using visual c++ 2010 express compiler.
second, following this page guide. i've included #import statement msado15.dll. #import directive underlined red, , error receive when hovering on says "...cannot open source file path/to/msado15.tlh," , ado stuff copy source stays red underlined. i've checked directory listed in error message , msado15.tlh there, if matters. also, program compiles (it crashes though after executing, that's else i'll diagnose separately).
i'm pretty clueless why happening. or advice appreciated.
the way it, add following out vc++ directories / include files
$(programfiles)\common files\system\ado
and import this
in header:
#import "msado15.dll" rename_namespace("ado") rename("eof", "endoffile") no_implementation
at top of cpp file
#import "msado15.dll" rename_namespace("ado") rename("eof", "endoffile") implementation_only
a little different, since prefer keep namespace, , use different eof rename.
Comments
Post a Comment