Page 1 of 1

cached updates & filter record bug

Posted: Wed 25 Nov 2015 18:57
by Ludek
hi,
if you build an application with:

Delphi 10 Seattle Update 1,
SDAC 7.2.8,
activate cached updates,
write an OnFilterRecordHandler

the application crashes with an access violation.

with delphi XE7 and SDAC 6.11.23 everything works fine.

sample code to reproduce this bug:

.pas

Code: Select all

unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, DBAccess, MSAccess, Data.DB, MemDS,
  Vcl.StdCtrls, Vcl.Grids, Vcl.DBGrids,
  Vcl.ActnMan, Vcl.ActnColorMaps, System.Actions,
  Vcl.ActnList, Vcl.Menus, Vcl.ExtCtrls, Vcl.ToolWin, Vcl.ActnCtrls, Vcl.ActnMenus;

type
  TForm1 = class(TForm)
    MainQ: TMSQuery;
    MSConnection1: TMSConnection;
    MainQfield: TIntegerField;
    procedure MainQSimpleFilterRecord(DataSet: TDataSet; var Accept: Boolean);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.MainQSimpleFilterRecord(DataSet: TDataSet; var Accept: Boolean);
begin
  inherited;
  accept := MainQfield.AsInteger = 0;
end;

end.
.dfm:

Code: Select all

object Form1: TForm1
  Left = 0
  Top = 0
  ClientHeight = 201
  ClientWidth = 304
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 13
  object MainQ: TMSQuery
    Connection = MSConnection1
    SQL.Strings = (
      'select 1 as field'
      ''
      '')
    CachedUpdates = True
    Filtered = True
    OnFilterRecord = MainQSimpleFilterRecord
    Active = True
    object MainQfield: TIntegerField
      FieldName = 'field'
    end
  end
  object MSConnection1: TMSConnection
    Database = 'master'
    Authentication = auWindows
    Server = 'localhost'
    Connected = True
    LoginPrompt = False
  end
end
Please help.
Thanks, Ludek.

Re: cached updates & filter record bug

Posted: Fri 27 Nov 2015 13:53
by azyk
Thank you for the information. We have reproduced this problem. We will notify you about the results as any are available.

Re: cached updates & filter record bug

Posted: Wed 02 Dec 2015 07:33
by Ludek
Are there any news? Need to continue in testing, so that my d10 seattle version is finished before release of delphi 11...

Re: cached updates & filter record bug

Posted: Mon 07 Dec 2015 08:16
by Ludek
What can I do to use SDAC with delphi 10 seattle? Modify myself the 6.x version for delphi 10? would you mind returning the subscription fee, as the substription is completely useless? the new version for d10s does not work and there's also no support?

Re: cached updates & filter record bug

Posted: Fri 11 Dec 2015 10:18
by Ludek
In the meantime found out, that even 6.11.23 & d10 seattle end with the same failure... something changed in delphi...???

Re: cached updates & filter record bug

Posted: Fri 11 Dec 2015 11:18
by azyk
We have fixed this problem. This fix will be included in the next SDAC build. SDAC release is planned for the next week.

Re: cached updates & filter record bug

Posted: Fri 11 Dec 2015 12:25
by Ludek
Thank you. I tried to delete these 2 lines

Code: Select all

        if FCachedUpdates then
          FilterUpdated;
in tdata.open with acceptable results, but i'll wait for an official solution.

Re: cached updates & filter record bug

Posted: Tue 15 Dec 2015 10:53
by azyk
The new SDAC build is already available for download at our website.

Re: cached updates & filter record bug

Posted: Tue 15 Dec 2015 14:01
by Ludek
Thank you very much, I'll try!

Re: cached updates & filter record bug

Posted: Thu 17 Dec 2015 12:45
by Ludek
It seems to work now. Thanks!