Click here to Skip to main content
15,851,701 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good morning Guys,

I am currently working on an Invoice Application where my client can select products from a database and output an invoice. Each order is then sent to the server where it will be prepared etc.

My first idea for this project was to connect to the database in real time and send the order information right away via 3G since the application is going to be used on a windows tablet machine.

After some thinking, I came up with another ( possibly better ) idea, I now want the program to automatically grab a copy of the MySQL database ( before the sales man go and take orders for example ) and store it locally, then the program works on the local database making the application much faster, efficient and fault proof.

At the end of the day, the Client will update the local database with the Main database.

My problem about this solution is that I don't know how to start implement the local database from the MySQL Server.

Any help would be Appreciated

Thank You,
Andrew Borg

Whoa there! You do not know what you are asking here!

Getting a local copy is a trivial operation, but the concept of a "local database" is not something MySql knows about - you would need a MySql installation on each and every machine it is to run on.

Worse, you will then have to deal with Replication which is it's own good thick book subject all on it's own! The problem is that you can't just go "add a record" to ten local databases, and expect them all to be sorted out for you when you return them to base and stuff the data back into the main database - you have to be very careful, or you will lose data, or correlate a customer with the wrong order. It is certainly possible to do, and it works pretty well, but it isn't just "get a copy and run away".

Time to do a good amount of reading! Start here:[^] and then branch out via Google.
Share this answer
Portable version of MySQL database is here...[^]
Share this answer
Having such a sensitive data in the portable device is not a good, but a realy bad idea. You'll have many things to take into account, from simple security to replication and backup.

The best idea would be to have the database in some other remote location (server) and have network access to it (at the end, 3G/4G/etc is used in the mobile device for establishing one network connection that permits you remote connections using standard TCP/IP ipV4/ipV6 connections).

If you need it for other type of application, there's one filebased open source portable database you can use: SQLite[^].
Share this answer

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