Mailinglist Archive: opensuse-programming (84 mails)
| < Previous | Next > |
opening transaction...for postgres on Qt
- From: Prabu Subroto <prabu_subroto@xxxxxxxxx>
- Date: Tue, 10 Aug 2004 08:40:49 -0700 (PDT)
- Message-id: <20040810154049.67473.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
Dear my friends...
I am using Qt3.2, Postgres and SuSE 9.1 .
I want to use "commit()" and "rollback()" mechanism
for my database application.
I defined my connection as underbelow:
bd = QSqlDatabase::addDatabase("QPSQL7", "OTHER");
bd->setHostName("192.168.23.237");
bd->setDatabaseName("kv");
bd->setUserName("postgres");
bd->setPassword("");
bd->transaction();
if ( ! bd->open() )
{
bd->lastError().showMessage();
}
But if I execute my application, I find this error
message in my linux console:
patrixlinux@patrix:~/arsip/proyek/qt/kv/client>
QPSQLDriver::beginTransaction: Database not open
And I also can do any SQL Query.
Where is my fault?
Please tell me.
Thank you very much in advance.
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
I am using Qt3.2, Postgres and SuSE 9.1 .
I want to use "commit()" and "rollback()" mechanism
for my database application.
I defined my connection as underbelow:
bd = QSqlDatabase::addDatabase("QPSQL7", "OTHER");
bd->setHostName("192.168.23.237");
bd->setDatabaseName("kv");
bd->setUserName("postgres");
bd->setPassword("");
bd->transaction();
if ( ! bd->open() )
{
bd->lastError().showMessage();
}
But if I execute my application, I find this error
message in my linux console:
patrixlinux@patrix:~/arsip/proyek/qt/kv/client>
QPSQLDriver::beginTransaction: Database not open
And I also can do any SQL Query.
Where is my fault?
Please tell me.
Thank you very much in advance.
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
| < Previous | Next > |