Hello,

I thought I knew how to execute a stored procedure in a Dabo
application, but that was an error (probable reason: my first working
application uses a SQLite database).

I'm using a temporary cursor, like this, in a method of my bizobj:

    def nextMach(self, neubemerk=None):
        idst = self.getFieldVal('idst')
        gemacht = self.Record.gemacht
        crs = self.getTempCursor()
        try:
            crs.execute('EXECUTE PROCEDURE sp_naechstesmal(?, ?, ?)',
                        (idst, gemacht, neubemerk))
        except dabo.dException.DBQueryException, ex:
            dabo.ui.exclaim(str(ex), "Keine Termin-Automatik")
        self.requery()

The procedure should insert a new record into the table belonging to the
bizobj. The DatabaseActivityLog shows that it is executed, but
afterwards the new record isn't in the table.

Database is Firebird, and I suppose the transaction simply has to be
committed. Is dBizobj.commitTransaction() the right method or is there a
separate commit method for the temporary cursor? And do I need
dBizobj.startTransaction() first?

And is a temporary cursor the right way?

Suppose the database has stored procedures for all inserts, updates,
deletes. How to use that with a Dabo bizobj, which doesn't let me define
my own insert, update, delete statements?

Thank you,
Sibylle

-- 
Sibylle Koczian



_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/49da133b.5080...@t-online.de

Reply via email to