Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [Solved]Need to install any supporting software to execute the .exe file from other systems?
QtWS25 Last Chance

[Solved]Need to install any supporting software to execute the .exe file from other systems?

Scheduled Pinned Locked Moved Installation and Deployment
18 Posts 7 Posters 6.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prabuqt
    wrote on last edited by
    #1

    Hi everyone, I Developed an application and generated its .exe file and added the necessary dlls to it.
    Basically that application gets the data from other system(Windows7, SqlServer and Qt) which is in Lan.

    When I am executing the .exe file on other system(Windows7 SqlServer) which is having Qt, is executing without a problem.

    And if I try to execute the same file from other system(Windows7 no SqlServer and no Qt), the application is getting failed to retrieve the data from database.(.exe file is executing)

    If I try to execute the same file from other system(Windows Xp having SqlServer and Qt), the application is getting failed to retrieve the data from database.(.exe file is executing)

    All systems are connected in Lan. I give a connection string as follows.

    @QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
    db.setHostName("CONS04-PC\SQLEXPRESS");
    db.setDatabaseName("DRIVER={SQL Server};SERVER=CONS04-PC\SQLEXPRESS;DATABASE=Transport;UID=john;PWD=peter");
    @

    Can anyone tell me that what might be problem? Do I need to install any supporting software to execute the exe file from other system? My requirement is to run the .exe file from all systems in Lan.

    Thank you in advance.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      albeo
      wrote on last edited by
      #2

      In order to execute the Qt software you need the libraries, however you are executing the file therefor you have installed the libraries, perhaps your sql server isn't configured to accept connection through the network.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        prabuqt
        wrote on last edited by
        #3

        [quote author="albeo" date="1350439626"]In order to execute the Qt software you need the libraries, however you are executing the file therefor you have installed the libraries, perhaps your sql server isn't configured to accept connection through the network.[/quote]

        Thank you very much albeo for giving the replay. The system which is having Sql Server is configured to accept connection through the network. I Executed the .exe file on other system(having Windows7 and SqlServer) which is having Qt, is executing without a problem. But when I try to execute the same from other system(not having Qt,SqlServer) it is not getting executed.
        What might be the problem?

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lgeyer
          wrote on last edited by
          #4

          What does QSqlDatabase::lastError() say?

          1 Reply Last reply
          0
          • P Offline
            P Offline
            prabuqt
            wrote on last edited by
            #5

            [quote author="Lukas Geyer" date="1350451474"]What does QSqlDatabase::lastError() say?[/quote]

            Their are no errors. It is executing fine.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              giesbert
              wrote on last edited by
              #6

              First of all, you should check return values and error strings and log them somewhere. Tghis would ease the error detection. As you say, executing the application works, you just get no data, I expect the sql plugin is not loaded / does not work. But to check that, you need more trace / error detection.

              Nokia Certified Qt Specialist.
              Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

              1 Reply Last reply
              0
              • P Offline
                P Offline
                prabuqt
                wrote on last edited by
                #7

                [quote author="Gerolf" date="1350455525"]First of all, you should check return values and error strings and log them somewhere. Tghis would ease the error detection. As you say, executing the application works, you just get no data, I expect the sql plugin is not loaded / does not work. But to check that, you need more trace / error detection.[/quote]

                Thankyou for your suggestion Gerolf. This might help me. I am having another question to ask, if we give an exe (+required dll's) to any client, do we need to give any supporting software (like any framework ) to execute the exe file on his system or it will work without any installations?
                please do clarify
                Thank you

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mlong
                  wrote on last edited by
                  #8

                  Start by checking out "this document":/doc/qt-4.8/deployment.html for information on deploying Qt applications.

                  Software Engineer
                  My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    prabuqt
                    wrote on last edited by
                    #9

                    [quote author="Gerolf" date="1350455525"]First of all, you should check return values and error strings and log them somewhere. Tghis would ease the error detection. As you say, executing the application works, you just get no data, I expect the sql plugin is not loaded / does not work. But to check that, you need more trace / error detection.[/quote]

                    Hello Gerolf, Thank you for your suggestion. As you said I created a logfile to trace the program. It is giving an error like "Driver not loaded Driver not loaded". Can you please help me that what I am missing.
                    Thank you in advance.

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      andre
                      wrote on last edited by
                      #10

                      Did you actually install the Qt database drivers you are using?

                      Anyway, moving to Installation and Deployment forum.

                      1 Reply Last reply
                      0
                      • P Offline
                        P Offline
                        prabuqt
                        wrote on last edited by
                        #11

                        [quote author="Andre" date="1351000676"]Did you actually install the Qt database drivers you are using?
                        Anyway, moving to Installation and Deployment forum.[/quote]
                        Thank you for your answer. I am getting this error when I try to run the exe file on other system. So can you help me on this that what I am missing?

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          andre
                          wrote on last edited by
                          #12

                          So, did you install the driver plugins or not? If you only send the .exe file, you did not. But that would probably not run at all, as then the Qt .dlls would be missing as well.

                          1 Reply Last reply
                          0
                          • P Offline
                            P Offline
                            prabuqt
                            wrote on last edited by
                            #13

                            [quote author="Andre" date="1351002696"]So, did you install the driver plugins or not? If you only send the .exe file, you did not. But that would probably not run at all, as then the Qt .dlls would be missing as well.[/quote]

                            Can you please give me a link that how to install driver plugins? I added the required dll's to the exe file.
                            Thank you

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              andre
                              wrote on last edited by
                              #14

                              "This documentation page":http://qt-project.org/doc/qt-4.8/deployment-plugins.html gives you some basic pointers, but frankly isn't very clear.

                              Take a look at this directory structure:
                              @
                              myProgram.exe
                              QtCore4.dll
                              QtSql4.dll
                              <other Qt libs>
                              sqldrivers\qsqlite.dll
                              sqldrivers\qsqlodbc.dll
                              sqldrivers<other sql drivers you need>
                              @

                              The above is quite a normal directory layout. Note the sqldrivers directory with in there the driver plugins. Also note that there are many other classes of plugins you may or may not need. The most frequently used would be the imgeformats plugins, which you need if you use any other image type than PNG.

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                Macro
                                wrote on last edited by
                                #15

                                Come on prabuqt... "The same Thread here Once again":http://qt-project.org/forums/viewthread/21159/ why are you posting the same issues again and again....

                                1 Reply Last reply
                                0
                                • A Offline
                                  A Offline
                                  andre
                                  wrote on last edited by
                                  #16

                                  I have merged the two threads. Please don't post the same question more than one time.

                                  1 Reply Last reply
                                  0
                                  • P Offline
                                    P Offline
                                    prabuqt
                                    wrote on last edited by
                                    #17

                                    [quote author="Andre" date="1351063932"]"This documentation page":http://qt-project.org/doc/qt-4.8/deployment-plugins.html gives you some basic pointers, but frankly isn't very clear.

                                    Take a look at this directory structure:
                                    @
                                    myProgram.exe
                                    QtCore4.dll
                                    QtSql4.dll
                                    <other Qt libs>
                                    sqldrivers\qsqlite.dll
                                    sqldrivers\qsqlodbc.dll
                                    sqldrivers<other sql drivers you need>
                                    @
                                    [/quote]

                                    Thank you so much Andre. As you said I just added the following files to the existing
                                    sqldrivers\qsqlite.dll
                                    sqldrivers\qsqlodbc.dll.
                                    now it is working. I am marking the Title as Solved. Thank you so much.

                                    1 Reply Last reply
                                    0
                                    • A Offline
                                      A Offline
                                      andre
                                      wrote on last edited by
                                      #18

                                      Note that if you only use ODBC, you obviously don't need to distribute the qsqlite.dll plugin. It will only add to the weight of your distribution package, and will take time on application startup to load the plugin. Note that all found plugins are loaded, no matter if they are needed by the application or not.

                                      1 Reply Last reply
                                      0

                                      • Login

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • Users
                                      • Groups
                                      • Search
                                      • Get Qt Extensions
                                      • Unsolved