Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
1.67/5 (3 votes)
Hi all,

I've an application with a database and my plan is to use MS Access. But there can be people without installed MS Access on there computers. To handle such cases what's the best option to take in .Net/C#.

Thanks in advance.
Posted
Comments
[no name] 26-Feb-15 12:38pm    
Installed MS-Access isn't required, you just need to install the Access runtime components along with your applications (I did this with an very old version of Access and I don't have a resource link for you at hand - you should be able to find it with Google)
CodingLover 26-Feb-15 23:36pm    
So in that case I need to install the runtime components with my application. I'll search on that more.
ibrahim_ragab 26-Feb-15 20:36pm    
You can use sql compact 4.0

Client computers does not need Access to be installed. .Net libraries support many database providers. See: .NET Framework Data Providers[^]
To be able to use MS Access as a database, you need to use OLEDB drivers. That's all.

Note: please, carefully read Sergey's answer. There is a lot of usefull information. You should know that Access database has several limits, such as database size (2GB). You have many alternatives: PostgreSQL, MySQL, SQL Server Express edition, etc. Choose the best one for you (depending on your/application needs/requirements).
 
Share this answer
 
v2
Comments
CodingLover 27-Feb-15 10:36am    
Thanks a lot for the update. I'll re-evaluate with all your suggestions and my application. Mainly on that database size.
Maciej Los 27-Feb-15 10:38am    
You're very welcome ;)
It depends on what you want to achieve. But you hardly can find (or would need to find) anything equivalent to Access, by one simple reason: it's easy to find something much better (open-source, light weight, decent functionality), but hard to find something as bad as Access, which is not even trivial client-server. As this should not be a practical problem, just consider this:
http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems[^],
http://en.wikipedia.org/wiki/Comparison_of_object-relational_database_management_systems[^].

—SA
 
Share this answer
 
Comments
CodingLover 26-Feb-15 23:44pm    
I may want to access the database in multi-threaded applications across multiple process. It seems to me that Access is much better, may be than the SQLite. My concern is that prerequisites dependencies to the user and the size of the installer.
Sergey Alexandrovich Kryukov 27-Feb-15 8:34am    
It's all up to you. :-)
—SA
Maciej Los 27-Feb-15 4:25am    
Agree, it depends on many factors, such as client requirements, framework, etc.
+5!
Sergey Alexandrovich Kryukov 27-Feb-15 8:34am    
Thank you, Maciej.
—SA
If you just need something for a single user app, SQL Compact should work. The only downside is it doesn't support views like Access, but of course there are workarounds for that.
 
Share this answer
 
Don't focus on one database, use a database layer. You'll spend the same time writing code for one single database than for a bunch of it.
 
Share this answer
 
I would suggest SQLite, which is a powerful database. I have been using this for years in desktop applications.
Using SQLite in your C# Application[^]
 
Share this answer
 
Comments
CodingLover 26-Feb-15 23:39pm    
If I have thousands of records, is it better than Access. Or which one is the best? Is there an editor work on with SQLite? Sorry that I haven't work with it before.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900