opening transaction...for postgres on Qt
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
Hello all,, , I've made tcsh script that uses a environment variable that can be defined or not, the script works, but if the variable is not defined i get the message 'carrotcount: Undefined variable.' from the example script below . . . #!/usr/bin/tcsh echo $carrotcount My question is : is there a way to suppress the 'undefined variable' message or can i check wether it is defined (in a tcsh script) . . Grtz Dries Pruimboom -- 01110111 01110111 01110111 00101110 01110000 01110010 01110101 01101001 01101101 01100010 01101111 01101111 01101101 00101110 01110100 01101011 <End of message>
dries wrote:
Hello all,, ,
I've made tcsh script that uses a environment variable that can be defined or not, the script works, but if the variable is not defined i get the message 'carrotcount: Undefined variable.'
from the example script below . . .
#!/usr/bin/tcsh echo $carrotcount
My question is : is there a way to suppress the 'undefined variable' message or can i check wether it is defined (in a tcsh script) . .
Grtz Dries Pruimboom
man tcsh on my SuSE 8.2 turned up this under the "Variables" section : . . . . The following substitutions can not be modified with `:' modifiers. $?name ${?name} Substitutes the string `1' if name is set, `0' if it is not. HTH, YMMV, & all that.
participants (3)
-
dries
-
Prabu Subroto
-
William A. Mahaffey III