Hey ho!
I'm using ADO in my WINAPI project with Microsoft.ACE.OLEDB.12 (msado26.tlb) with no problem, but now I need to be able to compact the database from my application and i've learnt that to do so i need to add msjro.dll to my project to execute the following code:
IJetEnginePtr and JetEngine are properly recognized as classes in my Visual Studio but the problems is that when i try to import the JET dll itself by:Code:void db_compact() { try { IJetEnginePtr jet(__uuidof(JetEngine)); jet->CompactDatabase( "Provider=Microsoft.Jet.OLEDB.12.0;Data Source=d:\\xxx.accdb;Jet OLEDB:Database Password=test", "Provider=Microsoft.Jet.OLEDB.12.0;Data Source=d:\\xxx.accdb;" "Jet OLEDB:Engine Type=5;Jet OLEDB:Database Password=test"); } catch(_com_error e) { errorhandler(e); } }
my compiler gives the following errors:Code:#import "C:\Program Files (x86)\Common Files\System\ado\msjro.dll" no_namespace
I cannot find any threat that gives some resolution to this problem which (from what i've read) apparently appears on WIN7 64 bit only (my OS!) although the application i compile is a WIN32.2 <path>\msjro.tlh IntelliSense: identifier "_Recordset_DeprecatedPtr" is undefined 196
3 <path>\msjro.tlh IntelliSense: identifier "_Recordset_DeprecatedPtr" is undefined 224
4 <path>\msjro.tlh error C2146: syntax error : missing ';' before identifier 'ConflictTables' 196
5 <path>\msjro.tlh error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 196
6 <path>\msjro.tlh error C2146: syntax error : missing ';' before identifier 'GetConflictTables' 224
7 <path>\msjro.tlh error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 224
8 <path>\msjro.tlh warning C4183: 'GetConflictTables': missing return type; assumed to be a member function returning 'int' 224
1 <path>\msjro.tli IntelliSense: identifier "_Recordset_DeprecatedPtr" is undefined 111
9 <path>\msjro.tli error C2143: syntax error : missing ';' before 'IReplica::GetConflictTables' 111
10 <path>\msjro.tli error C2433: '_RecordsetPtr' : 'inline' not permitted on data declarations 111
11 <path>\msjro.tli error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 111
12 <path>\msjro.tli error C2064: term does not evaluate to a function taking 2 arguments 115
Has anyone heard about any solution for this? From what i've read on other forums the JET does not go together with 64 Win7 but somehowe I have it installed. Only my compilator doesn't understand those certain parts of msjro.tlh and .tli... while importing that msjro.dll. I am a bit lost... :-0
will be grateful for any hint!
cheers
b.