Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Execute Qt apps with SQL server connection from Network computer
I want to access Qt apps (shared folder) from another computer through Run command. If the computer has SQL server installed, it works. The problem is there's no way that I will install SQL server in every computer, how can I access freely from other computer without SQL server? Error sentence: Datasource name not found and no default driver specified QODBC3: Unable to connect.
Thanks for your help
@ingridforQt Hi and welcome!
It is not really clear what you want to do. If there is no SQL server then you can't use SQL functionality in your app to share data.
But if you just need a shared folder why not use Samba (shared directories on Windows)? Just create a shared directory.
Also, I don't understand what you mean here: "through Run command".
@jsulm Hi thanks for your reply, it means that I have several clients computer to access my app, I don't know how to share the app except that I have to share my app folder. Do you understand what I mean? The client computers don't have SQL server installed
@ingridforQt I'm still not sure I understand. So, you have an app written in Qt and other computers are going to access that app over network, is that correct? What exactly is this Qt app going to do? Is it some kind of server providing data/services/...?
If your Qt app need to provide access over network take a look at https://doc.qt.io/qt-5/qtnetwork-programming.html
By the way: client computers do not need a SQL server, the SQL server is running on a server machine. Clients only access the SQL server over network.
@jsulm OK then let's forget about network programming, I simply have one folder that contains the application. I want to copy this folder into another computer that doesn't have SQL server. The error occurs, what should I do so I can access the application without error? The database is in server computer. How can this computer access the database? Do I need to install plugin or something?
I hope this time it's clear.
@ingridforQt Copying an application from one computer to another isn't related to Qt. Simply use a shared folder for that.
What error occurs?
To me it sounds like you need to deploy your app to make it work on another computers. For that see https://doc.qt.io/qt-5/deployment.html
@jsulm The error said "Data Source name not found and no default driver specified QODBC3: Unable to connect."
@ingridforQt I think you need to deploy your app properly. This way you will get a directory containing your app executable and all libs and plug-ins it needs. See my link above.
@jsulm Thanks it works now, seems like I need to install SQL native client. The deployment process already correct, thank you