Breaking changes

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
brace
Posts: 213
Joined: Wed 14 Feb 2007 08:26

Breaking changes

Post by brace » Thu 10 Jul 2014 12:10

I tried to isntall sdac 6.10.20, before i had 6.1.6

TUpdateRecordTypes is not recognized, and thsee too: rtDeleted, rtModified, rtInserted

could you please tell me which are the new equivalents?

Thank you.

THe code where i am using this is the following (i made //* comments where i use it)

(refer to procedure TMSSavePoint.StoreCurrentData)

Code: Select all

type
  TMSSavePoint = class(TComponent)
  private
    FMemDataSet: TMemDataSet;
    FvtDeleted: TVirtualTable;
    FvtUpdatedAppended: TVirtualTable;
[...]
end;

implementation

constructor TMSSavePoint.Create(aMemDataSet: TMemDataSet);
begin
  FMemDataSet := aMemDataSet;
  FvtDeleted := TVirtualTable.Create(Self);
  FvtUpdatedAppended := TVirtualTable.Create(Self);
end;

procedure TMSSavePoint.StoreCurrentData;
var
  oldUpdateRecordTypes: TUpdateRecordTypes; //*
begin
  //savepoint using two TVirtualTable
  oldUpdateRecordTypes := FMemDataSet.UpdateRecordTypes;  
  FMemDataSet.UpdateRecordTypes := [rtDeleted];  //*
  FvtDeleted.Assign(FMemDataSet);
  FMemDataSet.UpdateRecordTypes := [rtModified, rtInserted];  //*
  FvtUpdatedAppended.Assign(FMemDataSet);
  FMemDataSet.UpdateRecordTypes := oldUpdateRecordTypes;
end;

brace
Posts: 213
Joined: Wed 14 Feb 2007 08:26

Re: Breaking changes

Post by brace » Thu 10 Jul 2014 13:00

i realized i just needed to add

Code: Select all

Uses db;
before it was not needed. You can ignore my question, or simply realize that Uses db is now necessary.

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Re: Breaking changes

Post by Dimon » Fri 11 Jul 2014 08:18

Thank you for your advice.

Post Reply