Insecurefarm
Insecurefarm

Reputation: 401

Good alternative to a database in a C# program

I have to make a small program for my job, my position is really not IT related, and I'm making this for our personal-professional use. I've already made it in Access, and it's working okay, but I personally don't like it.

It's really simple, there is a list of different places (about 300) containing about 10 columns.

This is in a DataGridView, and when we select some place, we can print the report of visits to that place.

Problem: I want to do it in C#, so I thought about using a simple Access database but I get an "OLEDB database driver is not in the system" or something like that.

We work on a restricted WIZE client, and nothing can be changed in the Windows configuration. So I was looking for an alternative for my database. Can I use a simple XML file and store it there, or is there is any simpler alternative that can allow my to make SQL-like requests and insert/delete/update in the database?

Sorry for my English, it is not my primary language :)

Edit: Thank you all for this help, it's greatly appreciated. I'll look into SQLite.

Upvotes: 4

Views: 7004

Answers (6)

user1362368
user1362368

Reputation: 29

I hate to say it but one of those free CMS solutions would be best for you. UI and database handled for you . think wordpress as an intranet and i am sure whatever your business need is . there just might be the perfect plugin for that. It seems to be a simple project and there is no need to re-invent the wheel , remember you may end up having to support your application.

Upvotes: 0

Lex Li
Lex Li

Reputation: 63203

If your application is really simple, you can use sqlite-net as a simple object-relation mapping layer to manage your objects/tables,

https://github.com/praeclarum/sqlite-net

And then connect to C#-SQLite,

http://code.google.com/p/csharp-sqlite/

Using them, your application can be "portable" (no installation to Windows system). Just copy the binary to a machine with .NET installed, it will work.

Upvotes: 2

Igor
Igor

Reputation: 3656

Look at the SQL Server Compact. For solution deployment you will not need any system changes or configuration. All comes with your solution DLLs. Example of converting data, possible problems and solution: SQL Server Compact 4.0 and Entity Framework

Upvotes: 3

Will Demaine
Will Demaine

Reputation: 1396

If you really need a database with SQL style queries for this then I'd suggest taking a look at SQLite.

"SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine."

Should be pretty simple to set up and get working and you probably wont need to install anything. There is an ADO.NET adapter which you can get from here:

http://system.data.sqlite.org

Alternatively, you could store the information in some kind of file such as an XML file or CSV file.

Upvotes: 4

tawman
tawman

Reputation: 2498

You have several options of lightweight SQL/NOSQL options that you can use with C# on a machine with limited install rights:

Upvotes: 5

Grant Winney
Grant Winney

Reputation: 66459

I don't know if these are simple enough for your situation, or if you have the necessary access to install them, but here are a few free databases. Then again, you say you're not in IT so maybe setting these up is going further than you'd like...

Upvotes: 2

Related Questions