PC Review


Reply
Thread Tools Rate Thread

C#, Access, and DAO

 
 
kennethj
Guest
Posts: n/a
 
      17th Oct 2008
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't open my Access files after conversion from Access 97 to Access 2003 M Shafaat Microsoft Access 5 10th Apr 2010 09:04 PM
Saving Access 2007 database in Access 2003 format fails in Access =?Utf-8?B?U3Bpcm8=?= Microsoft Access External Data 0 13th Aug 2006 08:37 AM
W2K3 Service w/ UNC Access, Local Disk Access, and DB Access Rob Microsoft C# .NET 6 2nd Aug 2004 01:44 PM
Access "showing images on first page only of very wide Access report. Windows XP, Access XP Jack Microsoft Access Reports 4 18th Nov 2003 03:01 PM
Re: Allowing users (w/o MS Access) to access an Access 2000 database Wayne Morgan Microsoft Access 0 29th Sep 2003 11:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:48 PM.