udigold
udigold

Reputation: 161

C# winforms as front-end for access

I'm in the early stages of building a winform C# app based on Access db (can't use other types of DB for different reasons). My main issue is how to design the DB since the amount of data is vast (based on daily data) and it will fill up the its size limit within a month or so. I thought of creating a new DB for every month, but how will I be able to compare data between the different DB, for example, between months? I want the C# app to execute the queries. Are there any tutorials, books? I have no experience of using and linking front and back-end Access.

Any ideas? Thanks!

Upvotes: 0

Views: 2647

Answers (4)

Christian Specht
Christian Specht

Reputation: 36431

You probably don't want to hear this, but starting a project with MS Access as the backend is not a good idea when you already know in advance that you will hit Access' size limit after only a month.

You say in a comment:

I'm stuck with Access because of these: 1. High cost of SQL server. 2. I'm not familiar with SQL server. 3. SQL server express (the free edition) also has a size limit, though larger (10gb). Are there other DB free and without size limitation? Are there other DB free

I agree with you that SQL Server is not a good solution in your situation - high price and size limitation are valid arguments against SQL Server (both full version and Express Edition).

So, in my opinion using a different database engine is the only real solution here.
Your third argument against SQL Server was "I'm not familiar with it", but I strongly advise you to become familiar with another database engine than Access, because using Access in your situation (size limit!!!) will be a pain in the long run.
(Note to all nitpickers: No, I'm not bashing Access in general - I'm making a living with it myself.
However, it has its limits and when you know in advance that you'll hit its size limit within a month, it's not a good idea to use it here.)

Yes, you could do some hack and use a different Access database for each month, but you will really feel the pain as soon as your users will need to load data from several months at once, or as soon as your boss asks you for a "quick report about our sales in the last three years" :-)

But you can use a different database engine. Yes, you will have to invest time to become familiar with it, learn how to set it up and so on.
But believe me, it will pay off in the long run because you don't have to deal with the hassle of one database file per month.

There are lots of free and capable database engines available, the most known are:

Upvotes: 2

Slugart
Slugart

Reputation: 4680

To connect to the MS Access database(s) you can use the code shown here and then you can go about 'joining' the data in your C# front-end.

You might end up writing a subset of a DB engine in C# though and I thoroughly support the comments provided by Bernard and Bryan.

Upvotes: 1

Chris Bye
Chris Bye

Reputation: 1048

Your DB design should be isolated from your front-end technology decisions, and the reverse is also true. See Multitier Architecture.

Using a multi-tier architecture will help you separate presentation from business logic from data access, allowing you to design and implement each of these components in a modular and robust fashion.

diagram from webopedia

Searches for N-Tier architecture or Multitier architecture will find a wealth of information and help on how to implement multi-tier solutions and why you should go to the trouble.

Upvotes: 0

Related Questions