Hi,
I'm having some problems with the TAccessApplication object.
I use it to open msAccess from within a cppbuilder program.
I can open access, but I cannot seem to open a database project.
when my code is executed msaccess is started and shown. but the database is not opened. I also try to open a report, but I think the problem lies with opening the db.
Is there anyone with any experience on this subject ?
the code I am using :
Access->Connect();
Access->set_Visible(true);
AnsiString path= "C:\WINDOWS\Desktop\Huurmanager\huur.mdb";
// convert ansistring to wchar_t
wchar_t wstr[100];
path.WideChar(wstr,100);
Access->OpenCurrentDatabase(wstr,false);
// set tagvariant to char*
tagVARIANT tv ;
tv.vt = VT_I1;
tv.pcVal="reportname";
Access->DoCmd->OpenReport(tv, acViewDesign, EmptyParam, EmptyParam);
thanks in advance.
I'm having some problems with the TAccessApplication object.
I use it to open msAccess from within a cppbuilder program.
I can open access, but I cannot seem to open a database project.
when my code is executed msaccess is started and shown. but the database is not opened. I also try to open a report, but I think the problem lies with opening the db.
Is there anyone with any experience on this subject ?
the code I am using :
Access->Connect();
Access->set_Visible(true);
AnsiString path= "C:\WINDOWS\Desktop\Huurmanager\huur.mdb";
// convert ansistring to wchar_t
wchar_t wstr[100];
path.WideChar(wstr,100);
Access->OpenCurrentDatabase(wstr,false);
// set tagvariant to char*
tagVARIANT tv ;
tv.vt = VT_I1;
tv.pcVal="reportname";
Access->DoCmd->OpenReport(tv, acViewDesign, EmptyParam, EmptyParam);
thanks in advance.