Subject | RE: [IBO] Transaction Commit Problem |
---|---|
Author | Jason Wharton |
Post date | 2007-03-13T01:46:44Z |
I don't see anything that looks problematic here.
Is it possible you do not have all the queries configured to use the same
transaction?
Jason Wharton
Is it possible you do not have all the queries configured to use the same
transaction?
Jason Wharton
> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of jfgreco915
> Sent: Monday, March 12, 2007 1:37 PM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] Transaction Commit Problem
>
>
> I call commit whenever you save. After about 30-50 edits and saves it
> slows down. All it is is basic updates/inserts depending upon the
> situation. I appreciate the help!
>
> This is the EDIT button, it puts the form into edit mode.
>
> procedure TBrokerMaint.btnEditClick(Sender: TObject);
> begin
> if fBrokerCode <> '' then
> begin
> Edit(True);
> Common.LoanScapeSQL.StartTransaction;
> end
> else
> ShowMessage('You must choose a broker first.');
> end;
>
>
> This is the SAVE button. The GatherForm and GatherMemo just setup the
> SQL properly.:
>
> procedure TBrokerMaint.btnSaveClick(Sender: TObject);
> var
> qryTarget : TIBOQuery;
> begin
> try
> qryTarget:= TIBOQuery.Create(self);
> qryTarget.DataBaseName := 'DBShea';
>
> GatherForm(False,'BROKER',dtsData,qryTarget,['BROKERCODE']);
> qryTarget.ParamByName('BROKERCODE').Asstring := fBrokerCode;
> if debugging then qryTarget.SQL.SaveToFile('BrokerMaint.xx');
> qryTarget.ExecSQL;
>
> GatherMemo( cddNOTES, false,'BROKER',qryTarget,['BROKERCODE'] );
> qryTarget.ParamByName('BROKERCODE').Asstring := fBrokerCode;
> if debugging then qryTarget.SQL.SaveToFile('BrokerNotes.xx');
> qryTarget.ExecSQL;
>
> Common.LoanScapeSQL.Commit;
> except
> on E: exception do
> begin
> SQLErrorFileAndDialog( qryTarget,
> E,
> 'Unable to save Broker',
> 'SHEA2' );
> end;
> end;
> FreeAndNil(qryTarget);
> Edit(False);
> end;
>
> This is the CANCEL button:
>
> procedure TBrokerMaint.btnCancelClick(Sender: TObject);
> begin
> Edit(False);
> doQueries;
> if Common.LoanScapeSQL.InTransaction then
> Common.LoanScapeSQL.Rollback;
> inherited;
> end;
>