ADO\SQLServer\Transactions
From: JR (JR65403_at_att.net)
Date: 06/05/04
- Next message: Bryan Valencia: "Re: I miss TBatchMove"
- Previous message: Bernhard Hartl: "Re: MS SQL - How to get simple Integers from the SQL-Server to Delphi"
- Next in thread: Viatcheslav V. Vassiliev: "Re: ADO\SQLServer\Transactions"
- Reply: Viatcheslav V. Vassiliev: "Re: ADO\SQLServer\Transactions"
- Reply: Del Murray: "Re: ADO\SQLServer\Transactions"
- Reply: Brian Bushay TeamB: "Re: ADO\SQLServer\Transactions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 05 Jun 2004 08:54:26 -0500
I am using Delphi 7, SQLServer 2000, and ADO
I use the ADODatasets in the application to select, insert, update and
delete records. Is the correct place to setup the
ADOConnect.BeginTrans, ADOConnect.CommitTrans and ADOConnect.rollback in
the onclick event of the save button.
procedure TfrmDemographicis.btnSaveClick(Sender: TObject);
var
Save_Cursor:TCursor;
begin
Save_Cursor := Screen.Cursor;
Screen.Cursor := crSQLWait;
adoConn.BeginTrans;
try
adoConn.CommitTrans;
except
on Exception do
begin
MessageDlg('Exception Message Unable to Update Tables: ' ,
mtInformation, [mbOK],0);
raise;
adoConn.RollbackTrans;
exit;
end; //on exception
end; //try
Screen.Cursor := Save_Cursor;//
end;
TIA
- Next message: Bryan Valencia: "Re: I miss TBatchMove"
- Previous message: Bernhard Hartl: "Re: MS SQL - How to get simple Integers from the SQL-Server to Delphi"
- Next in thread: Viatcheslav V. Vassiliev: "Re: ADO\SQLServer\Transactions"
- Reply: Viatcheslav V. Vassiliev: "Re: ADO\SQLServer\Transactions"
- Reply: Del Murray: "Re: ADO\SQLServer\Transactions"
- Reply: Brian Bushay TeamB: "Re: ADO\SQLServer\Transactions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]