Results 1 to 19 of 19

Thread: odbc/connection problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Posts
    33
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1
    Thanked 2 Times in 1 Post

    Default Re: odbc/connection problem

    Quote Originally Posted by jacek View Post
    Yes, that's a plugin with QODBC driver.

    Put it in the right directory, just as documentation says, or compile it into your application or Qt.
    i can use this if it is in the c:qt\4.3.2\.....\drivers (so u mean to say that i have to put the qsqlodbc4.dll here) if a computer dont have qt installed this dir/doesnt exist...

    to run my program in computer that dont have qt ( i do this):

    1 copy the exe file

    2 copy the QTCore4.dll and QTSql4.dll (can be with the application)

    3 make the dir... c:qt\4.3.2\......\drivers

    4 copy the qsqlodbc4.dll

    5 move the qsqlodbc4.dll to the dir i make (in number 3)

    note: " if i dont do 2-5 steps my program will 'run' but connection to 'database' fails"

    6 then my program will run and connect to database

    my question is: is it posible to remove number 2-5 step??...

    just copy the exe file and run...

    1. it will run even without the .dlls required to run the program files (i made this by -static)

    2. it will connect to database even without (.dlls that connects to database) QTCore4.dll, QTSql4.dll and qsqlodbc4.dll ( i dunno how)

    can i build my apllication that will add this .dlls (QTCore4.dll, QTSql4.dll and qsqlodbc4.dll) internaly so that it will nolonger require this .dlls..?
    Last edited by triperzz; 18th January 2008 at 18:36.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: odbc/connection problem

    Quote Originally Posted by triperzz View Post
    1 copy the exe file
    Where do you copy that file exactly?

    Quote Originally Posted by triperzz View Post
    can i build my apllication that will add this .dlls (QTCore4.dll, QTSql4.dll and qsqlodbc4.dll) internaly so that it will nolonger require this .dlls..?
    Yes, you already asked that question and the answer is still the same: link your application statically.

  3. #3
    Join Date
    Jan 2008
    Posts
    33
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1
    Thanked 2 Times in 1 Post

    Default Re: odbc/connection problem

    Quote Originally Posted by jacek View Post
    Where do you copy that file exactly?
    in the folder of my project.. after i build it, QDEVELOP will build an exe file. That exe file is the one that i copy.. is that right??

    Quote Originally Posted by jacek View Post
    Yes, you already asked that question and the answer is still the same: link your application statically.
    how?....

    i do it in cmd.. configure -static-release -no-exection then mingw32-make sub-src (is this right?)

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: odbc/connection problem

    Quote Originally Posted by triperzz View Post
    in the folder of my project.. after i build it, QDEVELOP will build an exe file. That exe file is the one that i copy.. is that right??
    OK, let me put it in another way: If you copy your application to C:\xxx then you have to place qsqlodbc4.dll in c:\xxx\sqldrivers directory.

    Quote Originally Posted by triperzz View Post
    i do it in cmd.. configure -static-release -no-exection then mingw32-make sub-src (is this right?)
    If it compiles, then it's OK. You can add -qt-sql-odbc switch to get rid of the plugin.

  5. #5
    Join Date
    Jan 2008
    Posts
    33
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1
    Thanked 2 Times in 1 Post

    Default Re: odbc/connection problem

    Quote Originally Posted by jacek View Post
    OK, let me put it in another way: If you copy your application to C:\xxx then you have to place qsqlodbc4.dll in c:\xxx\sqldrivers directory.
    thanks!! i dont really understand it when you first post this reply... now i understand, and it works...

    Quote Originally Posted by jacek View Post
    If it compiles, then it's OK. You can add -qt-sql-odbc switch to get rid of the plugin.
    i will try this one now.. in cmd qt\...>configure <command> (right??)

    thanks again...

  6. #6
    Join Date
    Jan 2008
    Posts
    33
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1
    Thanked 2 Times in 1 Post

    Default Re: odbc/connection problem

    my app still require's the .dlls files even if i execute the -static in config??

    maybe my steps in making my program static are wrong can you please help me...

    my steps are:

    in cmd

    1. c:\qt\4.3.2>configure -static -release -no-exceptions

    2. c:\qt\4.3.2>mingw32-make sub-src

    3. c:\qt\4.3.2>configure -saveconfig

    is their something im missing?

    when i run this i think im just rerunning the configure.exe (i first run this for my libraries after the installation then now rerun it for -static -release)

    plz give me some guide to do this right...

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: odbc/connection problem

    Quote Originally Posted by triperzz View Post
    my app still require's the .dlls files even if i execute the -static in config??
    Which ones? How do you compile your application?

  8. #8
    Join Date
    Jan 2008
    Posts
    33
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1
    Thanked 2 Times in 1 Post

    Default Re: odbc/connection problem

    Quote Originally Posted by jacek View Post
    Which ones?
    same .dlls and now with the Gui4.dll.

    Quote Originally Posted by jacek View Post
    How do you compile your application?
    i just compile it in QDevelop..
    i dont no if thats right?i compile it after i run the configure -static in cmd... i dont know how to -static my proj... plz help me how..

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: odbc/connection problem

    Quote Originally Posted by triperzz View Post
    same .dlls and now with the Gui4.dll.
    Do you have Qt installed in more than one place?

    Quote Originally Posted by triperzz View Post
    i just compile it in QDevelop..
    i dont no if thats right?
    Make sure QDevelop is using qmake from the static Qt build.

  10. #10
    Join Date
    Jan 2008
    Posts
    33
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1
    Thanked 2 Times in 1 Post

    Default Re: odbc/connection problem

    Quote Originally Posted by jacek View Post
    Do you have Qt installed in more than one place?
    none, i just install qt and mingw.. plus I just save my project in desktop.

    Quote Originally Posted by jacek View Post
    Make sure QDevelop is using qmake from the static Qt build
    how?

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: odbc/connection problem

    Quote Originally Posted by triperzz View Post
    how?
    I don't use QDevelop, but there should be some dialog that allows you to configure paths to all of the tools you need to compile your application. Since you have just one installation of Qt, the paths should be OK.

    What files do you have in c:\qt\4.3.2\lib folder? How big are the .a files?

  12. #12
    Join Date
    Jan 2008
    Posts
    33
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1
    Thanked 2 Times in 1 Post

    Default Re: odbc/connection problem

    Quote Originally Posted by jacek View Post
    What files do you have in c:\qt\4.3.2\lib folder? How big are the .a files?
    in my c:qt\4.3.2\lib have .a files, some are 1mb - less the biggest is 9 mb for ui...


    how can i make my app static? step by step plz i think im missing something...

Similar Threads

  1. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  2. [QMYSQL] connection problem
    By chaos_theory in forum Installation and Deployment
    Replies: 5
    Last Post: 2nd July 2007, 09:52
  3. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.