Problem with multiselecton after changing OLEDBProvider to prDirect

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Fratod68
Posts: 2
Joined: Thu 08 Jan 2015 11:03

Problem with multiselecton after changing OLEDBProvider to prDirect

Post by Fratod68 » Thu 08 Jan 2015 11:43

Hello,
I wanted to try the DirectMode for the UniConnection to a MSSQLServer.
I use UNIDAC 6.0.1 in Delphi XE3. OS: Windows 7 64Bit.
I have a Table Employees in my database with ca. 800 records.
I use a CRDBGrid to Show the records (connected to a TUniQuery object).
I have a "Select All" procedure to select all the visible rows of the dataset.
It Looks like this

Code: Select all

procedure DBGridSelectAll(AGrid: TCRDBGrid) ;
 begin
  AGrid.SelectedRows.Clear;
    with AGrid.DataSource.DataSet do
    begin
      DisableControls;
      First;
      try
        while not EOF do
        begin
          AGrid.SelectedRows.CurrentRowSelected := True;
          Next;
        end;
      finally
        EnableControls;
      end;
    end;
end;
If I try to select all the records (in a normal Situation this doesn't happen so often but it could happen), I get the following error:
Assertion failure. (D:\Projects\Delphi\Dac\Common\Source\MemData.pas, line2880)
I don't have such a path. I don't have a MemData.pas.
Debug Shows only Assembler code.
The Problem rises only if I set the TUNIConnection property OLEDBProvider to prDirect instead of prAuto.
If I set the Option to prAuto then I don't get automatically the DirectMode and my Software Needs the updated Microsoft Native Client to work on the Client machines.
The Problem disappears if I use the filter Option on the CRDBGrid.
It should not be a Problem of CRDBGrid because I was able to replicate the Problem with a normal DBGrid.
Has anyone an Idea on where the Problem could hide?
Thanks in advance,
Francesco

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

Re: Problem with multiselecton after changing OLEDBProvider to prDirect

Post by azyk » Thu 08 Jan 2015 14:20

We tried to reproduce this error using Direct mode, according to your recommendations, but the problem wasn't reproduced. Please try to compose a small sample to demonstrate the problem including a script to create test tables and send it to andreyz*devart*com .

Post Reply