Qt Forum - programming with C++ and Qt
»
QtForum.org
»
Qt
»
Qt Designer
»
QDataTable & PostgreSQL
» Hello Guest [
Login
|
Register
]
Last Post
|
First Unread Post
Print Page
|
Recommend to a Friend
|
Add Thread to Favorites
QDataTable & PostgreSQL
Author
Post
«
Previous Thread
|
Next Thread
»
flewer
Assistant
Registration Date: 30.03.2008
Posts: 7
Level: 7
[?]
Experience: 336
Next Level: 443
QDataTable & PostgreSQL
Hello everybody! I am working on a Database now.
I set up a Database and then a Table under
PostgreSQL 8.3
. I used the code below to set up a connection:
QSqlDatabase *defaultDB = QSqlDatabase::addDatabase( DB_BOOKS_DRIVER );
defaultDB->setDatabaseName( DB_BOOKS );
defaultDB->setUserName( DB_BOOKS_USER );
defaultDB->setPassword( DB_BOOKS_PASSWD );
defaultDB->setHostName( DB_BOOKS_HOST );
if ( ! defaultDB->open() ) {
qWarning( "Failed to open books database: " +
defaultDB->lastError().driverText() );
qWarning( defaultDB->lastError().databaseText() );
return FALSE;
And
it's OK
.
I used a QDataTable to access Database. I select the certain table I set up in pgAdmin. But a error ocurred when I click the Preview Button(Qt Designer).
Would you please give some advice to me ? Thanks a lot!
24.04.2008
05:25
flewer
Assistant
Registration Date: 30.03.2008
Posts: 7
Level: 7
[?]
Experience: 336
Next Level: 443
Thread Starter
RE: QDataTable & PostgreSQL
I did all these work under windows.
24.04.2008
08:35
Tree Structure
|
Board Structure
Jump to:
Please select:
--------------------
QtForum.org
-- QtForum
---- Tutorials, Tips and snippets
-- Qt
---- Qt Embedded, Qtopia, QSA
---- Qt Programming
---- KDE Development
---- Qt Designer
---- Installing Qt
-- Other Forums
---- C++ programming
---- Offtopic
---- Job Forum
------ commercial jobs
------ non commercial
Qt Forum - programming with C++ and Qt
»
QtForum.org
»
Qt
»
Qt Designer
»
QDataTable & PostgreSQL
views today:
5.524 |
views yesterday:
12.104 |
total views:
10.250.997
Klebekork Shop
-
Linux Shop
-
Kontaktanzeigen
-
Linux Forum
-
SMS Gewinnspiel
-
Hotels
-
Stadtpläne
-
Branchenbuch & Stadtplan