tags:

views:

151

answers:

6

I am writing a C++/MFC application that will use Microsoft Access to store data. I hope using it will suit my purpose : small, lightweight way to keep application's data.

the question i'm asking myself is : if I use Access as DB, will the client's machine be required to install Microsoft Access to use my software ?

thanks.

+3  A: 

Do you simply want to use Access files (*.mdb), or do you want to embed the Access Active Object in your application?

If you just want to use its file format, they just need to install the ODBC drivers, not the entire application.

But if you want to use ActiveX to embed Access UI inside your application, they need to have full Access installed.

Francis
one more comment - since you've mentioned XML, I think you just need a format / library to store data. You should really consider SQLite in this case, because it's free, fast, small, and fully functional as a RDBMs.
Francis
I just need to use Access files to store the data and then, use that data for my application. no ActiveX embedding.Can you please tell me the exact steps to follow ? (+ code if possible)Thanks.
Attilah
I just need to store the data in application data in Access, no ActiveX stuff involved(no embedding Access UI).can you please show the code ? at least a tutorial on it.I'm already googling SQLite. i'll look into it.Thanks.
Attilah
If you want to use Access, you need to use ODBC in your program, which is really complex - see MSDN: http://msdn.microsoft.com/en-us/library/ms403288.aspx If you are OK with SQLite, a simpler page is here: http://www.sqlite.org/quickstart.htmlBut I also agree with Neil - you should really make sure what do you need - a RDBMS or non-RDBMS like Berkerley DB.
Francis
Why do you say ODBC? Most ACE/Jet applications use OLE DB nowadays.
onedaywhen
OLE DB is just a COM wrapper SDK to ODBC. Have you ever see a "OLE DB driver for Access"? No, because OLE DB simply wraps ODBC. I say ODBC because it's the real technology behind; it's OK to choose whatever SDK you want to use to manipulate ODBC, and OLE DB is just one of them. He did not mention what SDK he's going to use, so I say ODBC to represent what he'll use to process his MDB files.
Francis
+1  A: 

Going by the Microsoft Data Access Components page on Wikipedia, it states in the table that from the initial release of Windows 2000, ODBC drivers for Microsoft Access are included by default. In other words, you should be safe to assume that your program should have no problems reading MS Access databases on any Windows PC nowadays.

Noldorin
A: 

Francis is correct, however you might want to take a look at more robust DB choices. SQLite, SQL Server Compact Edition, or Firebird are all good alternatives to MS Access for simple, light-weight, easy RDBMS needs.

Scott Anderson
A: 

You don't need Access to use a an Access database - you can use ODBC for that. However, if you are also considering XML, I suggest you have not analysed the problem you are trying to solve deeply enough - XML and databases like Access have almost nothing in common.

anon
Neil,thanks for ur answer.my application includes a tree view and a list view. the tree view's and list view's items have to be saved somewhere and then, on starting, the application has to take the saved items from the DB and load them back in the controls.do u think i'm better off using SQLite ? any advice ?Thanks.
Attilah
Ifv you arec talking about data that is read once when the app starts and written once when it terminates, then XML is a possible contender. If you ned to update the on-disk data throughout the apps run, then it really isn't.
anon
OK, I get it.Thanks a lot.
Attilah
A: 

No
.

Jeff O
+1  A: 

The problem here is the promiscuous use of "Access" to mean "Jet MDB." If you've got an Access database, it's an Access application, with UI objects (forms/reports/etc.) and to run it you must have Access or the Access runtime installed.

It's pretty clear, though, that you're just using a Jet MDB to store your data, in which case everything you need is already installed on every version of Windows from 2000 on because Jet is installed as part of the OS.

David-W-Fenton