Good Afternoon,
I'm starting in the world of Qt and a Firebird database.And finish the driver installation process and perform operations onthe database insert, update and consultation.
When I started to make stored procedures and run them from Qt did not work. Does not fail and always us that everything was made ​​perfect, but the database does not run.
I am programming in Linux using Qt 2.0.1 and Firebird 2.1
I create a simple stored procedure test which makes it an insert into a table. It works by running the console but when trying to run fromQt does not work and gives me no errors.The SQL code is:

Qt Code:
  1. SET TERM ^ ;
  2. CREATE PROCEDURE AGREEGAR_UNO AS
  3. BEGIN
  4. insert into JUEGO(CODIGO,ESCRUTINIO,ESTADO,FECHA,HORAINICIO) values (next value for GNECODIGOJUEGO,'111,123,154,169,178','Hi', current_date, current_time);
  5. END^
  6. SET TERM ; ^
  7. GRANT EXECUTE ON PROCEDURE AGREEGAR_UNO TO SYSDBA;
To copy to clipboard, switch view to plain text mode 
The following code will use to connect to firebird from Qt

Qt Code:
  1. bool VentanaPrueba::conectar()
  2. {
  3. this->db= QSqlDatabase::addDatabase("QIBASE","Data");
  4. this->db.setDatabaseName("./BD/Data.fdb");
  5. this->db.setPassword("password");
  6. this->db.setUserName("SYSDBA");
  7. if(!db.open())
  8. {
  9. return false;
  10. }
  11. else
  12. return true;
  13. }
To copy to clipboard, switch view to plain text mode 
And this is the code that is responsible for calling the procedure

Qt Code:
  1. void VentanaPrueba::procedimiento()
  2. {
  3. if (!this->db.isOpen()) this->conectar();
  4. if(this->db.isOpen())
  5. { QSqlQuery procedimiento = QSqlQuery::QSqlQuery(this->db);
  6. bool bandera = procedimiento.prepare("EXECUTE PROCEDURE AGREEGAR_UNO");
  7. QString err = procedimiento.lastError().text();
  8. bool respuesta= procedimiento.exec();
  9. //this->db.commit();
  10. if(!respuesta)
  11. {
  12. this->db.close();
  13. }else
  14. {
  15. procedimiento.finish();
  16. this->db.commit();
  17. this->db.close();
  18. }
  19.  
  20.  
  21. }else{
  22. //error
  23. }
  24.  
  25.  
  26. }
To copy to clipboard, switch view to plain text mode 

Thank you very much for your help.