. , , ,

,,,

briefcase — ,

ADO.

. , , . , , . , . .

, :

, .

, .

.

, .

:

. on-line off-line.

. , - . , . . .

.

Internet Web

Web , on-line. . .

. :

1

, . . .

briefcase

Briefcase . , , , . Delphi ADO MIDAS.

, briefcase :

;

;

;

.

MS SQL . ParamsHolder, Params :

ParamID Int , identity
ParamName Varchar(50) not null
ParamValue Varchar(50)

. , .

2

, ParamConns, ParamsCS. briefcase. Action-.

briefcase ADO

ADO / , briefcase.

, :

procedure TForm1.act_RemoteConnectExecute(Sender: TObject);

begin

1 try

2 try

3 with ParamsCS do

4 begin

5 Close;

6 CommandType:=cmdText;

7 CommandText:=sqlText;

8 Connection:=ParamsConn;

9 Open;

10 end;

11 act_SaveLocal.Execute;

12 except

13 on E:Exception do

14 MessageDlg(Format(msgServerConnectError, [E.Message]), mtError, [mbOk],0);

15 end;

16 finally

17 ParamsConn.Connected:=false;

18 act_ConnectLocal.Execute;

19 end;

, .

try finally ( 1, 12-15) . 2-10. try except . . , , 5-9. TADODataset (ParamsCS) . : . , ( TADODataset.LoadFromFile) CommandType CommandText. LoadFromFile act_ConnectLocal. , Action ( 11).

( ) . ADO ( TCustomADODataset) , SaveToFile. . , . :

XML

ADTG (Advanced Data Tablegram)

ADTG, XML, .

XML, XML, SaveFile.

ParamsCS.SaveFile.

TCustomADODataSet LoadFromFile. Connection ParamsCS nil, . :

procedure TForm1.act_ConnectLocalExecute(Sender: TObject);

begin

ParamsCS.Connection:=nil;

ParamsCS.LoadFromFile(ExtractFilePath(Application.ExeName)+ParamFile);

end;

LoadFromFile (- CommandType) cmdFile CommandText , .

( ) . . .

UpdateBatch. , . , . , . . Update Criteria ADO RecordSet. Update Criteria :

AdCriteriaAllCols . .
AdCriteriaKey . . .
AdCriteriaTimeStamp TimeStamp
AdCriteriaUpdCols ,

EOleError c . ADO, 2.7. , MSDN, :

Filter Recordset ADO adFilterConflictingRecords. .

Resync AffectRecords adAffectGroup, ResyncValues adResyncUnderlyingValues, . UnderlyingValue Field, OriginalValue, Value.

.

UpdateBatch adAffectGroup.

ADOReconcileError. HandleADOReconcileError, . :

try

ParamsConn.Connected:=true;

ParamsCS.Connection:=ParamsConn;

ParamsCS.UpdateBatch;

except

on E:EOleException do begin

HandleADOReconcileError(ParamsCS);

end else raise;

end;

act_RemoteConnect.Execute;

ADO . CancelBatch. c arAll ( ) . arCurrent , .

briefcase MIDAS.


ADO.

 

 

 

! , , , .
. , :