K
kennethj
I've been searching everywhere to no avail. What I'm trying to do is connect
to an Access database and read Access properties, like the startup properties
or custom properties. In my case this is version. I have been able to connect
to the database fine using com interop and dao. My issue is that all the
properties show up as "system._comobject". I am hoping someone else has been
as geeky as me and already found a solution to this. I am open to any method
of connecting to the database but not any methods of changing how versioning
works. The versioning system in place works great and has for several years
I'm just trying to rewrite the system used to open my companies main Access
portal from classic VB6 to C#. The code I have to open the connection works
fine.
dao._DBEngine dbEng = new dao.DBEngineClass();
dbEng.SystemDB = Globals.WRKGRP;
dao.Workspace ws = dbEng.CreateWorkspace("WS1",
GlobalResources.aoDEFAULT_ACCESS_ADMIN, "", dao.WorkspaceTypeEnum.dbUseJet);
dao.Database dbMaster = ws.OpenDatabase(databasePath, false, false, "");
dao.Database dbLocal = ws.OpenDatabase(localPath, false, false, "");
I'm reading the properties like so:
foreach (dao.Property dbPropMaster in dbMaster.Properties)
{
versionMaster = dbPropMaster.Value.ToString();
}
I'm using VS 2005 and connecting to Access MDBs currently used in a
2002/2003 format. Any pointers or help would be much appreciated.
to an Access database and read Access properties, like the startup properties
or custom properties. In my case this is version. I have been able to connect
to the database fine using com interop and dao. My issue is that all the
properties show up as "system._comobject". I am hoping someone else has been
as geeky as me and already found a solution to this. I am open to any method
of connecting to the database but not any methods of changing how versioning
works. The versioning system in place works great and has for several years
I'm just trying to rewrite the system used to open my companies main Access
portal from classic VB6 to C#. The code I have to open the connection works
fine.
dao._DBEngine dbEng = new dao.DBEngineClass();
dbEng.SystemDB = Globals.WRKGRP;
dao.Workspace ws = dbEng.CreateWorkspace("WS1",
GlobalResources.aoDEFAULT_ACCESS_ADMIN, "", dao.WorkspaceTypeEnum.dbUseJet);
dao.Database dbMaster = ws.OpenDatabase(databasePath, false, false, "");
dao.Database dbLocal = ws.OpenDatabase(localPath, false, false, "");
I'm reading the properties like so:
foreach (dao.Property dbPropMaster in dbMaster.Properties)
{
versionMaster = dbPropMaster.Value.ToString();
}
I'm using VS 2005 and connecting to Access MDBs currently used in a
2002/2003 format. Any pointers or help would be much appreciated.