Results 1 to 13 of 13

Thread: Connect to database

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: Connect to database

    after a fight full of blood and tears, I sought my master in the other side of the kingdom(another programmer who has way more experience than me, and was moved to a branch a little far from my working place). He decided to help me and with his help, we slashed the dragons head (compiled the plugin). Now, with the dragon head on my hands, where do I find the magic potion?(I tried to list the drivers to see if it was correctly installed but the PSQL driver doesn`t appears)

    here is how I`m looking for the potion:

    Qt Code:
    1. QStringList test = QSqlDatabase::drivers();
    2. for(int i = 0;i<test.count();i++){
    3. qDebug()<<test[i];
    4. }
    To copy to clipboard, switch view to plain text mode 


    (Today I woke up been smashed by a D&D book, that may be why I`m writing like this......)

    long story short:
    we compiled the plugin, 4 files were created at "C:\Qt\2010.05\qt\plugins\sqldrivers"
    qsqlpsqld4.dll, qsqlpsql4.dll, libqsqlpsqld4.a and libqsqlpsqld5.a
    now I`m trying to use the driver but it says its not found.
    how does I make qt learn its existence/install it?

    Last updates XD:
    I used http://www.dependencywalker.com/ to find the missing .dll of my psql plugin, I added them to the sqldrivers folder and now it only gives me this error log:

    Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
    Error: Modules with different CPU types were found.
    Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

    I`m using a windows 7 - 64bits
    another note, I used dependencywalker on the qsqlite4.dll and it gives me exatly the same error log, but its present on the loaded drivers list.....why!? why!? why!?
    Last edited by seink; 26th April 2011 at 15:28.

  2. #2

    Default Re: Connect to database

    Finnaly the last part of the tale.
    With a broken sword and a dragons head, I look for the magic potion through every single path on the dragons cave. Many clues I find but no answers for why the magic potion wasn`t on the dragons resting place. After hour of walk through those labirinths called forum topics and documentation, I was completly lost in the middle of all those commands and magic words. Finally after transfering the dragon bones to the ritual`s chamber, the magic seal is broken and the potion appears! With the magic item in hands I follow back to the start of our jorney, to open the gate of the postgre.

    (ok, after messing a little more.....man those D&D made something to my head.....)
    I took all those .dll I extracted from the postgre bin folder to where my application is been built and it finally recognised the plugin.
    So now, without more dragon quest, I will mess with the database as I please ^^.

Similar Threads

  1. Questions about connect to remote database
    By stmk in forum Qt Programming
    Replies: 3
    Last Post: 11th November 2010, 10:02
  2. QSqlDatabase - How to connect to multiple database?
    By cutie.monkey in forum Qt Programming
    Replies: 4
    Last Post: 10th March 2010, 12:03
  3. how to connect to a microsoft access database?
    By mismael85 in forum Qt Programming
    Replies: 3
    Last Post: 7th March 2008, 09:25
  4. Replies: 5
    Last Post: 28th August 2006, 14:36
  5. My application can't connect to database when deploy it???
    By gtthang in forum Installation and Deployment
    Replies: 1
    Last Post: 15th February 2006, 11:01

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.