Using Microsoft Access 2007 database with Visual C# 2010 -


i have finished designing c# application stores employees data in access database. program works when install microsoft office 2007 on machine, causes error if uninstall office 2007. now, wonder if there method enables program connect access database without installing whole microsoft office 2007.

using system.data.oledb; 

if connection string uses microsoft.ace.oledb.12.0 provider need microsoft access database engine installed on client.

at link provided find installation of 2 versions of provider.
1 32bit , 1 64bit.

the right 1 use depends target cpu defined in app , operating system bitness. of course on 32bit os cannot install 64bit provider while reverse possible.

if app compiled x86 target cpu need 32bit version , install app on 64bit systems. if app compiled x64 target cpu need 64bit version , run on 64bit systems. if app compiled any cpu should decide @ install time version of ace.oledb.12.0 install depending on bitness of operating system.

if not enough give headache things start bad if there office installed on client machine.

office installs automatically provider compatible version (32 or 64 bit) , cannot install different version of these libraries side side other one.

so best options?

  • write app x86 target cpu , provide dedicated setup systems office 64 bit installed or ask customer change office version. (i'm kidding)
  • write app anycpu target, check @ install time os bitness , choose appropriate version of engine. on 64bit systems hope customer has not installed 32bit version of office.
  • use access 2003 format (mdb) , compile x86 target cpu. approach requires microsoft.jet.oledb.4.0 provider should available on target client. doesn't require install , should work flawlessy on system.
  • switch sqlite or sql server compact edition or sql server localdb. these options requires complete retesting of application, database schema migration , code changes. still, dedicated libraries, needed distribute

personally small, single user applications, limited amount of data (less 1gb) , integration other office applications use access 2003 mdb solution.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -