Click here to Skip to main content
15,850,917 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I developed a C# .NET CRUD application through Visual Studio 2022. I would just like to know how can I setup an .exe file of it together with the database I created through xampp (MySQL). I have been working on this for weeks, but I can't seem to find a solution. Also, is it possible if I can run the app to the other computers without actually installing xampp to their machines anymore? Thanks.

What I have tried:

I've tried publishing the app directly from VStudio 2022, and transferred all files to another computer, and it worked. However, I can't connect the database.
Posted
Updated 6-Oct-23 10:17am
v3
Comments
PIEBALDconsult 6-Oct-23 10:09am    
Do not try to include a database system in the install of your application.
Just make sure to state in the documentation that it requires some database system. The user can then choose how and where to install it. The user may already have a suitable database system available.

1 solution

MySql is a server based DB system, and it requires an instance of MySql to be installed where the user can "get to it" - normally just somewhere on the same network segment.

You can't just provide the app EXE and a DB file: the DB has to be added to the existing MySql instance.

That gets complicated, because you have no idea where or how MySql was installed, or even that there is an installed instance - so you need to get information on the instance (including login info if it isn't just "use Windows login" which it probably isn't for production systems).

If you are using the DB in single user mode with no need to share the DB with other users then I'd suggest changing to SqLite or similar as that is designed for that rather than as a much more complex multiuser system.
 
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