cached updates & filter record bug

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

cached updates & filter record bug

Post by Ludek » Wed 25 Nov 2015 18:57

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.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: cached updates & filter record bug

Post by azyk » Fri 27 Nov 2015 13:53

Thank you for the information. We have reproduced this problem. We will notify you about the results as any are available.

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Re: cached updates & filter record bug

Post by Ludek » Wed 02 Dec 2015 07:33

Are there any news? Need to continue in testing, so that my d10 seattle version is finished before release of delphi 11...

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Re: cached updates & filter record bug

Post by Ludek » Mon 07 Dec 2015 08:16

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?

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Re: cached updates & filter record bug

Post by Ludek » Fri 11 Dec 2015 10:18

In the meantime found out, that even 6.11.23 & d10 seattle end with the same failure... something changed in delphi...???

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: cached updates & filter record bug

Post by azyk » Fri 11 Dec 2015 11:18

We have fixed this problem. This fix will be included in the next SDAC build. SDAC release is planned for the next week.

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Re: cached updates & filter record bug

Post by Ludek » Fri 11 Dec 2015 12:25

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.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: cached updates & filter record bug

Post by azyk » Tue 15 Dec 2015 10:53

The new SDAC build is already available for download at our website.

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Re: cached updates & filter record bug

Post by Ludek » Tue 15 Dec 2015 14:01

Thank you very much, I'll try!

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Re: cached updates & filter record bug

Post by Ludek » Thu 17 Dec 2015 12:45

It seems to work now. Thanks!

Post Reply