I have created a desktop application that uses MySQL database (local access). I am able to build the code and was successful in running the desktop application in my own computer.
But when i copied the exe folder and tried to execute in another system, it says no database found.
I understand that the database is not bundled along with the exe file generated with the build command.
Being new to Xojo, Kindly let me know how to incorporate the database along with the exe file so that i can run the application in any computer.
My database have huge amount of data and can extent to a wider application in future.
Based on few reviews earlier, i came to know SQLite is more suitable for small applications.
hence i prefered MySQL. Is it possible to bundle the database with exe.? Does it require and extra scripting?
If so, Can you suggest me where can i find the solution for this?.
@Ivan Tellez Thanks for replying.
But i am developing the software for a client who will commercialize it and multiple users may install it.
In such case now can i handle it?
Generally what you end up doing is making MySQL a requirement for using the application. The end user is responsible for setting MySQL up and creating the database with an initial script that you provide. They will also have to setup user security which may, or may not, give your application the ability to modify the schema.
Then you application will have a SETUP screen that lets them connect to the server and particular database. When it comes to servers your app is a guest and you will have to play by their rules. So you’ll have to be accommodating on database name, user name and password, check for proper schema, etc.
I’m sure there are examples in the real world, but I don’t know of any apps that create their own MySQL instance and claim sole usage of it. It’s generally not how db applications work.
You might want to look at CubeSQL as it’s a lightweight SQLite database server. I think you can included it in your bundle and start/stop it manually. Never used it that way but it’s something to look at.
FWIW, I’ve had several gigabytes SQLite databases with no issues.
what is a “huge amount of data” ?
I have a sqlite database with 600k+ records in one of its 30+ tables and it performs completely fine.
not sure if mysql is a better choice for a local database.
also the licencing scheme of mysql is quite obscure: they can ask you money at any time if they want it…
You may better write your app to use SQLite by default and offer users to use CubeSQL, MySQL or PostgreSQL for server mode.
If your SQL is just SQL-92, this should be easy to code in Xojo.
And you avoid the risk that for a MySQL only app someday Oracle comes to get a license fee for commercially bundling MySQL!