Subject | RE: [firebird-support] Re: Stored Procedures Memory Usage |
---|---|
Author | Alan McDonald |
Post date | 2004-10-19T10:37:07Z |
> You are right, I am new to firebird. Here is the part of code whichso if there's an error you return to return_error without rolling back the
> called frequently. As far as I know, this the hard commit. Tell me if
> there is anything wrong in it.
>
>
> EXEC SQL
> SET DATABASE DB='/opt/firebird/data/ssg.gdb';
>
> connect_db(&dbconn)
> DB=dbconn.conn;
> sigsetjmp(env,1);
> EXEC SQL
> SET TRANSACTION USING DB;
> EXEC SQL
> UPDATE session SET bytesin=:ses->bytesin, bytesout=:ses-
> >bytesout, lastupd='NOW', trfratein=:ratein,trfrateout=:rateout
> WHERE sesno=:ses->session_id AND
> state='A';
>
> if (db_error
> (SQLCODE,&gds__trans,isc_status,"accountupdate.execute",env,&retry))
> goto return_error;
>
> EXEC SQL
> COMMIT;
> pr_error
> (SQLCODE,&gds__trans,isc_status,"accountupdate.end");
> disconnect_db(&dbconn);
> return retval;
>
transaction?
Am I reading it correctly?
Alan