Qt Forum - programming with C++ and Qt
Register Calendar Members List Team Members Search Frequently Asked Questions Go to the Main Page

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
Post New Thread Post Reply
Go to the bottom of this page QDataTable & PostgreSQL
Author
Post « Previous Thread | Next Thread »
flewer
Assistant


Registration Date: 30.03.2008
Posts: 7

Level: 7 [?]
Experience: 336
Next Level: 443

107 points of experience needed for next level

Fragezeichen QDataTable & PostgreSQL Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

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 is offline Send an Email to flewer Search for Posts by flewer Add flewer to your Buddy List View the MSN Profile for flewer
flewer
Assistant


Registration Date: 30.03.2008
Posts: 7

Level: 7 [?]
Experience: 336
Next Level: 443

107 points of experience needed for next level

Thread Starter Thread Started by flewer
RE: QDataTable & PostgreSQL Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

I did all these work under windows.
24.04.2008 08:35 flewer is offline Send an Email to flewer Search for Posts by flewer Add flewer to your Buddy List View the MSN Profile for flewer
Tree Structure | Board Structure
Jump to:
Post New Thread Post Reply
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

Branchenbuch Österreich - Branchenbuch Niederlande - Portugal Branchenverzeichnis - Spanien Branchenverzeichnis 
Telefonbuch - Branchenbuch Frankreich