Page 2 of 2 FirstFirst 12
Results 21 to 35 of 35

Thread: use qpsql

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

    Default Re: use qpsql

    Quote Originally Posted by raphaelf
    What is a build key?
    It's a special string that you can assign to your Qt DLLs and plugins. When Qt loads a plugin it checks whether both keys are the same, but since you have never heard about it, you have probably probably left the default values, so it shouldn't be a problem.

    Open libeay32.dll and libpq.dll in Dependency Walker and see if there are some DLLs missing. If it finds some, post them here.

  2. #22
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: use qpsql

    Hi,
    libeay32.dll seems to miss nothing
    libpq.dll seems to miss (i get a yellow question mark):
    - COMERR32.DLL
    - LIBINTL-2.DLL
    - KRB5_32.DLL
    - SSLEAY32.DLL

    If i open LIBPQ.DLL from the original path: D:\apps\PostgreSQL\8.1\bin then its missing nothing..
    Think DigitalGasoline

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

    Default Re: use qpsql

    Quote Originally Posted by raphaelf
    If i open LIBPQ.DLL from the original path: D:\apps\PostgreSQL\8.1\bin then its missing nothing..
    Then copy all missing DLLs from D:\apps\PostgreSQL\8.1\bin to the directory where your executable is.

  4. #24
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    3
    Thanked 5 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: use qpsql

    Just put those DLL into c:\windows\system32\

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

    Default Re: use qpsql

    Quote Originally Posted by ball
    Just put those DLL into c:\windows\system32\
    This is a bit dangerous solution. What if there is another program that uses those DLLs, but for example their older versions?

  6. #26
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    3
    Thanked 5 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: use qpsql

    Yeah you are right but in this case, we need to make his program get running as first priority problem to be solved.

  7. #27
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: use qpsql

    Hi everybody
    I put the dlls where my .exe is and i get the same error: driver not loaded..
    I really dont know what to do now

    P.S. If i start the sql browser example, i can just see: qsqlite and qodbc, but no qsqlpsql. Did this information help??

    Please help me to solve my problem..With QT3.2.1 i could connect me without problem to a postgre database..
    Think DigitalGasoline

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

    Default Re: use qpsql

    Quote Originally Posted by raphaelf
    I put the dlls where my .exe is and i get the same error: driver not loaded..
    Check all DLLs you have copied with Dependency Walker(you might be missing libiconv-2.dll).

    The other solution is to recompile Qt with -qt-sql-psql option, so that the driver will be compiled into the library. This way when you start your application it should tell you what DLLs are missing.

  9. The following user says thank you to jacek for this useful post:

    raphaelf (22nd August 2006)

  10. #29
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: use qpsql

    Hi Jacek,
    I think its a good idea..
    Should i type this comand to configure it:
    configure -qt-sql-psql
    make

    Or should i deinstall QT and install it again?
    Last edited by raphaelf; 21st August 2006 at 15:39.
    Think DigitalGasoline

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

    Default Re: use qpsql

    Quote Originally Posted by raphaelf
    Should i type this comand to configure it:
    configure -qt-sql-psql
    And then "make", but it will take few hours. Make a copy of your current Qt directory, so that you won't have to recompile it again.

    Checking with Dependency Walker will take at most few minutes.

  12. The following user says thank you to jacek for this useful post:

    raphaelf (22nd August 2006)

  13. #31
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: use qpsql

    Hi Jacek,
    I get following Error by configuring QT:

    Qt Code:
    1. o tmp\obj\debug_shared\qsql_psql.o drivers\psql\qsql_psql.cpp
    2. drivers\psql\qsql_psql.cpp:37:22: libpq-fe.h: No such file or directory
    3. drivers\psql\qsql_psql.cpp: In function `QSqlError qMakeError(const QString&, QS
    4. qlError::ErrorType, const QPSQLDriverPrivate*)':
    5. drivers\psql\qsql_psql.cpp:122: error: `PQerrorMessage' undeclared (first use th
    6. is function)
    7. drivers\psql\qsql_psql.cpp:122: error: (Each undeclared identifier is reported o
    8. nly once for each function it appears in.)
    9. drivers\psql\qsql_psql.cpp: In member function `bool QPSQLResultPrivate::process
    10. Results()':
    11. drivers\psql\qsql_psql.cpp:132: error: `PQresultStatus' undeclared (first use th
    12. is function)
    13. drivers\psql\qsql_psql.cpp:133: error: `PGRES_TUPLES_OK' undeclared (first use t
    14. his function)
    15. drivers\psql\qsql_psql.cpp:136: error: `PQntuples' undeclared (first use this fu
    16. nction)
    17. drivers\psql\qsql_psql.cpp:138: error: `PGRES_COMMAND_OK' undeclared (first use
    18. this function)
    19. drivers\psql\qsql_psql.cpp: In member function `void QPSQLResult::cleanup()':
    20. drivers\psql\qsql_psql.cpp:216: error: `PQclear' undeclared (first use this func
    21. tion)
    22. drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLResult::fetchL
    23. ast()':
    24. drivers\psql\qsql_psql.cpp:244: error: `PQntuples' undeclared (first use this fu
    25. nction)
    26. drivers\psql\qsql_psql.cpp: In member function `virtual QVariant QPSQLResult::da
    27. ta(int)':
    28. drivers\psql\qsql_psql.cpp:249: error: `PQnfields' undeclared (first use this fu
    29. nction)
    30. drivers\psql\qsql_psql.cpp:253: error: `PQftype' undeclared (first use this func
    31. tion)
    32. drivers\psql\qsql_psql.cpp:255: error: `PQgetvalue' undeclared (first use this f
    33. unction)
    34. drivers\psql\qsql_psql.cpp:256: error: `PQgetisnull' undeclared (first use this
    35. function)
    36. drivers\psql\qsql_psql.cpp:306: error: `PQunescapeBytea' undeclared (first use t
    37. his function)
    38. drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLResult::isNull
    39. (int)':
    40. drivers\psql\qsql_psql.cpp:320: error: `PQgetvalue' undeclared (first use this f
    41. unction)
    42. drivers\psql\qsql_psql.cpp:321: error: `PQgetisnull' undeclared (first use this
    43. function)
    44. drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLResult::reset(
    45. const QString&)':
    46. drivers\psql\qsql_psql.cpp:333: error: `PQexec' undeclared (first use this funct
    47. ion)
    48. drivers\psql\qsql_psql.cpp: In member function `virtual int QPSQLResult::numRows
    49. Affected()':
    50. drivers\psql\qsql_psql.cpp:344: error: `PQcmdTuples' undeclared (first use this
    51. function)
    52. drivers\psql\qsql_psql.cpp: In member function `virtual QVariant QPSQLResult::la
    53. stInsertId() const':
    54. drivers\psql\qsql_psql.cpp:350: error: `Oid' undeclared (first use this function
    55. )
    56. drivers\psql\qsql_psql.cpp:350: error: expected `;' before "id"
    57. drivers\psql\qsql_psql.cpp:351: error: `id' undeclared (first use this function)
    58.  
    59. drivers\psql\qsql_psql.cpp:351: error: `InvalidOid' undeclared (first use this f
    60. unction)
    61. drivers\psql\qsql_psql.cpp: In member function `virtual QSqlRecord QPSQLResult::
    62. record() const':
    63. drivers\psql\qsql_psql.cpp:363: error: `PQnfields' undeclared (first use this fu
    64. nction)
    65. drivers\psql\qsql_psql.cpp:367: error: `PQfname' undeclared (first use this func
    66. tion)
    67. drivers\psql\qsql_psql.cpp:370: error: `PQftype' undeclared (first use this func
    68. tion)
    69. drivers\psql\qsql_psql.cpp:371: error: `PQfsize' undeclared (first use this func
    70. tion)
    71. drivers\psql\qsql_psql.cpp:372: error: `PQfmod' undeclared (first use this funct
    72. ion)
    73. drivers\psql\qsql_psql.cpp: In function `bool setEncodingUtf8(PGconn*)':
    74. drivers\psql\qsql_psql.cpp:390: error: `PQexec' undeclared (first use this funct
    75. ion)
    76. drivers\psql\qsql_psql.cpp:391: error: `PQresultStatus' undeclared (first use th
    77. is function)
    78. drivers\psql\qsql_psql.cpp:392: error: `PQclear' undeclared (first use this func
    79. tion)
    80. drivers\psql\qsql_psql.cpp:393: error: `PGRES_COMMAND_OK' undeclared (first use
    81. this function)
    82. drivers\psql\qsql_psql.cpp: In function `void setDatestyle(PGconn*)':
    83. drivers\psql\qsql_psql.cpp:398: error: `PQexec' undeclared (first use this funct
    84. ion)
    85. drivers\psql\qsql_psql.cpp:399: error: `PQresultStatus' undeclared (first use th
    86. is function)
    87. drivers\psql\qsql_psql.cpp:400: error: `PGRES_COMMAND_OK' undeclared (first use
    88. this function)
    89. drivers\psql\qsql_psql.cpp:401: error: `PQerrorMessage' undeclared (first use th
    90. is function)
    91. drivers\psql\qsql_psql.cpp:402: error: `PQclear' undeclared (first use this func
    92. tion)
    93. drivers\psql\qsql_psql.cpp: In function `QPSQLDriver::Protocol getPSQLVersion(PG
    94. conn*)':
    95. drivers\psql\qsql_psql.cpp:407: error: `PQexec' undeclared (first use this funct
    96. ion)
    97. drivers\psql\qsql_psql.cpp:408: error: `PQresultStatus' undeclared (first use th
    98. is function)
    99. drivers\psql\qsql_psql.cpp:409: error: `PGRES_COMMAND_OK' undeclared (first use
    100. this function)
    101. drivers\psql\qsql_psql.cpp:409: error: `PGRES_TUPLES_OK' undeclared (first use t
    102. his function)
    103. drivers\psql\qsql_psql.cpp:410: error: `PQgetvalue' undeclared (first use this f
    104. unction)
    105. drivers\psql\qsql_psql.cpp:411: error: `PQclear' undeclared (first use this func
    106. tion)
    107. drivers\psql\qsql_psql.cpp: In destructor `virtual QPSQLDriver::~QPSQLDriver()':
    108.  
    109. drivers\psql\qsql_psql.cpp:464: error: `PQfinish' undeclared (first use this fun
    110. ction)
    111. drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLDriver::open(c
    112. onst QString&, const QString&, const QString&, const QString&, int, const QStrin
    113. g&)':
    114. drivers\psql\qsql_psql.cpp:535: error: `PQconnectdb' undeclared (first use this
    115. function)
    116. drivers\psql\qsql_psql.cpp:536: error: `PQstatus' undeclared (first use this fun
    117. ction)
    118. drivers\psql\qsql_psql.cpp:536: error: `CONNECTION_BAD' undeclared (first use th
    119. is function)
    120. drivers\psql\qsql_psql.cpp: In member function `virtual void QPSQLDriver::close(
    121. )':
    122. drivers\psql\qsql_psql.cpp:555: error: `PQfinish' undeclared (first use this fun
    123. ction)
    124. drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLDriver::beginT
    125. ransaction()':
    126. drivers\psql\qsql_psql.cpp:573: error: `PQexec' undeclared (first use this funct
    127. ion)
    128. drivers\psql\qsql_psql.cpp:574: error: `PQresultStatus' undeclared (first use th
    129. is function)
    130. drivers\psql\qsql_psql.cpp:574: error: `PGRES_COMMAND_OK' undeclared (first use
    131. this function)
    132. drivers\psql\qsql_psql.cpp:575: error: `PQclear' undeclared (first use this func
    133. tion)
    134. drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLDriver::commit
    135. Transaction()':
    136. drivers\psql\qsql_psql.cpp:590: error: `PQexec' undeclared (first use this funct
    137. ion)
    138. drivers\psql\qsql_psql.cpp:591: error: `PQresultStatus' undeclared (first use th
    139. is function)
    140. drivers\psql\qsql_psql.cpp:591: error: `PGRES_COMMAND_OK' undeclared (first use
    141. this function)
    142. drivers\psql\qsql_psql.cpp:592: error: `PQclear' undeclared (first use this func
    143. tion)
    144. drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLDriver::rollba
    145. ckTransaction()':
    146. drivers\psql\qsql_psql.cpp:607: error: `PQexec' undeclared (first use this funct
    147. ion)
    148. drivers\psql\qsql_psql.cpp:608: error: `PQresultStatus' undeclared (first use th
    149. is function)
    150. drivers\psql\qsql_psql.cpp:608: error: `PGRES_COMMAND_OK' undeclared (first use
    151. this function)
    152. drivers\psql\qsql_psql.cpp:611: error: `PQclear' undeclared (first use this func
    153. tion)
    154. drivers\psql\qsql_psql.cpp: In member function `virtual QString QPSQLDriver::for
    155. matValue(const QSqlField&, bool) const':
    156. drivers\psql\qsql_psql.cpp:873: error: `PQescapeBytea' undeclared (first use thi
    157. s function)
    158. drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLDriver::isOpen
    159. () const':
    160. drivers\psql\qsql_psql.cpp:903: error: `PQstatus' undeclared (first use this fun
    161. ction)
    162. drivers\psql\qsql_psql.cpp:903: error: `CONNECTION_OK' undeclared (first use thi
    163. s function)
    164. mingw32-make[3]: *** [tmp\obj\debug_shared\qsql_psql.o] Error 1
    165. mingw32-make[3]: Leaving directory `D:/apps/Qt/4.1.3/src/sql'
    166. mingw32-make[2]: *** [debug-all] Error 2
    167. mingw32-make[2]: Leaving directory `D:/apps/Qt/4.1.3/src/sql'
    168. mingw32-make[1]: *** [sub-sql-make_default-ordered] Error 2
    169. mingw32-make[1]: Leaving directory `D:/apps/Qt/4.1.3/src'
    170. mingw32-make: *** [sub-src-make_default-ordered] Error 2
    To copy to clipboard, switch view to plain text mode 
    Think DigitalGasoline

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

    Default Re: use qpsql

    Quote Originally Posted by raphaelf
    drivers\psql\qsql_psql.cpp:37:22: libpq-fe.h: No such file or directory
    Qt can't find PostgreSQL's headers. Pass -I and -L parameters with proper value to configure.

  15. The following user says thank you to jacek for this useful post:

    raphaelf (22nd August 2006)

  16. #33
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: use qpsql

    Hi Jacek!!
    It works after configure QT and set the Path and Lib with the Parameter -L and -I
    And i had to copy some dlls..Qt say me which dlls was misssing..
    Thanks

    But i have a question: Why do i get my exe file under the debug folder and not under the release folder?And what is the diference?
    Think DigitalGasoline

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

    Default Re: use qpsql

    Quote Originally Posted by raphaelf
    Why do i get my exe file under the debug folder and not under the release folder?And what is the diference?
    Under windows, qmake creates two Makefiles: Makefile.Release and Makefile.Debug. The latter is the default one and it compiles application with debugging symbols. To compile your application in "release" mode (i.e. optimized and without debugging information), you must run "make -f Makefile.Release".

    You can switch that feature off by adding:
    Qt Code:
    1. CONFIG -= debug_and_release
    2. CONFIG += release # or debug
    To copy to clipboard, switch view to plain text mode 
    to your .pro file.

  18. The following user says thank you to jacek for this useful post:

    raphaelf (22nd August 2006)

  19. #35
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: use qpsql

    Hi Jacek!!

    Thanks for your spended time and very good support
    It works perfect
    Think DigitalGasoline

Similar Threads

  1. Qt 4.1.4 plugin QPSQL
    By jcr in forum Installation and Deployment
    Replies: 4
    Last Post: 22nd June 2006, 23:55

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.