Bug with pbByNumber [XE8 Update 1 + FireDAC + SQLite + Array DML]

Hello.
I'm trying to use Array DML with SQLite (native mode) and I get this exception: Exception class EListError with message 'List index out of bounds (1)'. Project zip: http://www9.zippyshare.com/v/cOW0euhW/file.html

Code:
 {code}
const
  NUM_INSERTS = 10000;

procedure TForm7.Button3Click(Sender: TObject);
var
  i: integer;
  t: integer;
begin
  t := GetTickCount;

  FDQuery1.Params.BindMode := pbByNumber; // !!!!! <= !!!!!!
  FDQuery1.Connection.ExecSQL('DROP TABLE IF EXISTS tbl;');
  FDQuery1.Connection.ExecSQL('CREATE TABLE tbl(BaseNum INTEGER);');
  FDQuery1.SQL.Text := 'INSERT INTO tbl (BaseNum) VALUES (:BN)';

  FDQuery1.Connection.StartTransaction;
  try
    FDQuery1.Params.ArraySize := NUM_INSERTS;
    for i := 0 to NUM_INSERTS - 1 do
    begin
      FDQuery1.Params[0].AsIntegers[i] := i;
    end;
    FDQuery1.Execute(NUM_INSERTS, 0);

    FDQuery1.Connection.Commit;
  except
    FDQuery1.Connection.Rollback;
    raise;
  end;

  (Sender as TButton).Caption := FloatToStr((GetTickCount() - t) / 1000);
end;
 {code}

Connection: 
{code}
object FDConnection1: TFDConnection
  Params.Strings = (
    'DriverID=SQLite')
  ResourceOptions.AssignedValues = [rvArrayDMLSize]
  ResourceOptions.ArrayDMLSize = 150
  LoginPrompt = False
  Left = 115
  Top = 25
end
 {code} 

Query:
{code}
object FDQuery1: TFDQuery
  Connection = FDConnection1
  ResourceOptions.AssignedValues = [rvArrayDMLSize]
  ResourceOptions.ArrayDMLSize = 150
  Left = 179
  Top = 25
end
{code}
0
Ilja
8/15/2015 5:32:15 PM
embarcadero.delphi.firedac 822 articles. 2 followers. Follow

1 Replies
774 Views

Similar Articles

[PageSpeed] 3

This is a bug in FireDAC SQLite driver. There are two workarounds:
* do not use pbByNumber, but that will disable native array DML support;
* do not set ResourceOptions.ArrayDMLSize, but you will need to keep eyes open when you will have large array size.

-- 
With best regards,
Dmitry Arefiev / FireDAC Architect
0
Dmitry
8/18/2015 6:59:51 AM
Reply:

Similar Artilces:

Delphi FireDAC SQLite RecNo = -1
RecNo for a FireDAC FDTable in an SQLite database equals -1 even though the cursor is on the last of 1,200,000 records. What is that all about? http://docwiki.embarcadero.com/Libraries/XE7/en/FireDAC.Stan.Option.TFDFetchOptions.LiveWindowParanoic -- With best regards, Dmitry Arefiev / FireDAC Architect ...

Delphi FireDAC SQLite RecNo = -1
RecNo for a FireDAC FDTable in an SQLite database equals -1 even though the cursor is on the last of 1,200,000 records. What is that all about? http://docwiki.embarcadero.com/Libraries/XE7/en/FireDAC.Stan.Option.TFDFetchOptions.LiveWindowParanoic -- With best regards, Dmitry Arefiev / FireDAC Architect ...

FireDac Update 1 on Delphi XE4
Ok, I was able to download FireDac on our Mac and at home, so it seems that I can't download update 1 on our regular computers. However, am I mistaken when I say that there is no way to install the new FireDac update into Delphi XE4? If you use the showide parameter, Delphi XE4 will not show up. Thanks > {quote:title=Phillip Woon wrote:}{quote} > Ok, I was able to download FireDac on our Mac and at home, so it seems that I can't download update 1 on our regular computers. > > However, am I mistaken when I say that there is no way to install the new FireDac upd...

XE6 Update 1 and Firedac
Had XE6 prior to update 1, uninstalled (keeping registry) and then installed Update 1. For some reason, something triggered the protection scheme and I couldn't run projects. I uninstalled the IDE removing the settings. For safety, I removed the Embarcadero folders in documents and program files. Installed XE6 Update 1 On launch of the IDE for the first time, I got an error "Cant load package C:\Program Files (x86)\embarcadero\studio\14.0\bin\dcldatasnapfiredac200.bpl. Invalid access to memory location". This has cascaded to all the firedac components. While I wou...

FireDAC and Delphi Pro XE4... firedac tab not visible?
I am moving from a very old Borland product (2006) to Delphi XE4 Professional with FireDAC addon. I purchased both from Embarcadero, and have downloaded both. The documentation says the FireDAC components should automagically appear in the tabset for Delphi. They do not. I don't want to fool around too much as my environment is strictly controlled by IT, and they are very slow to do anything. Is there something that I should have done, but did not do? I installed XE4 first, registered it, then used the link in my email from Embarcadero to download the FireDAC components. Then I ra...

FireDac Update 1 corrupt file
I downloaded the FireDac Update 1 dated May 2nd, but every time I download it, it seems that the archive is corrupt? Has anyone succeeded in installing it? ...

[XE3 Update 1] Is there a list of bugs fixed in XE3 Update 1?
[XE3 Update 1] Is there a list of bugs fixed in XE3 Update 1? I suspected a storage overlay or maybe a problem with the memory manager that was causing addressing exceptions when destroying variants after FastReport->Prepare was called. These exceptions do not occur anymore after XE3 Update 1 is installed. I would like to see who found the error and where it was at. Larry Kalos Inc. I second a request for a bug fix list. XE3 without update 1 is again a great disappointment from Embarcadero. Too many bugs, causing IDE to crash during debugging and unable to inspect var...

Firedac is - and will be
As I see the only way to have updated Firedac is to buy the XE5 IDE - despite the valid Firedac subsription. But - can this new version of Firedac be used in older IDE? Is it possible to use current sources and compile a working version of Firedac for Delphi XE (2, 3, 4) or FPC? Will it be possible in the future? Can someone from EMBT or Dmitry state it clear? That's not Dmitry's decision - ask Marco and I think it's not even his. In another thread a very polite and helpful person told me - download the installer and install with the key given in the maintenance por...

status of SQLite encryption w/ FireDAC in XE8
I was reading in the docs that encryption is only for static linking the sqlite library. And that all but the Mac support this. For the mac, you MUST use a dynamic library. So does this mean that FireDAC supports sqlite encryption on Windows, IOS and Android, but not Mac? On a related note, can you copy the encrypted database on Windows and move it to another platform, and open it? i.e. it's compatible between platforms, even w/ encryption? Thanks, Troy > So does this mean that FireDAC supports sqlite encryption on Windows, IOS and Android, but not Mac? Yes, it is. ...

FireDAC mobile app error as sqlite as delphi XE7
i im trying of connect my app as FireDAC but i have some errors. I follor all steps of Mobile_Tutotils_en_pdf file for delphi XE7. First i add one FireDAConnection compoent, after i in FireDAConnection Edito i set DriverID as Sqlite, in Database parameter i set this existing sqlite database "shoplist.s3db i create this database and table as other tool, and i can to add this to DBExpres in data exploer and i can to use it in one mobile delphi project", and i set lockingmode to normal as this manual tell. After as tell in page 269 of this manual when i click over test button, i ...

Where can I find a Delphi XE4 FireDac SQLite for IOS?
Where can I find a good example of using Delphi XE4 FireDac SQLite for IOS? I am unable to use append and edit without getting strange data corruptions. An append is overwriting the last appended or editted record and then all other records are corrupted with foreign characters. Just need a good solid example to get started. Create the database and tables on the device. Do not want to use inserts or updates. Want to use the append, edit, and delete functionality from the client dataset components. Maintain storage on device. Strange that no SQLite examples with IOS are with s...

FireDAC mobile app error as sqlite as delphi XE7 [Edit]
i im trying of connect my app as FireDAC but i have some errors. I follor all steps of Mobile_Tutotils_en_pdf file for delphi XE7. First i add one FireDAConnection compoent, after i in FireDAConnection Edito i set DriverID as Sqlite, in Database parameter i set this existing sqlite database "shoplist.s3db i create this database and table as other tool, and i can to add this to DBExpres in data exploer and i can to use it in one mobile delphi project", and i set lockingmode to normal as this manual tell. After as tell in page 269 of this manual when i click over test button, i ...

FireDAC Updates
Hi Dmitry, What version of SQLite is in the RAD Studio XE4 Enterprise Installation? I can't find that info anywhere, nor can I find a list of changes for the versions 8.01 and 8.03 you have mentioned in several threads. Also, I use RAD Studio XE Enterprise, with a maintenance agreement, and my registered user download page has no FireDAC downloads for XE. Will FireDAC updates be available for XE? Joe Hello Joe > What version of SQLite is in the RAD Studio XE4 Enterprise Installation? You can check that using Environment report for a SQLite connection. At momen...

FireDAC mobile app error as sqlite as delphi XE7 [Edit] #2
i im trying of connect my app as FireDAC but i have some errors. I follow all steps of Mobile_Tutotils_en_pdf file for delphi XE7. First i add one FireDAConnection compoent, after i in FireDAConnection Edit i set DriverID as Sqlite, in Database parameter i set this existing sqlite database "shoplist.s3db , and i set lockingmode to normal as this manual tell. I After i follow steps 1,2,3,4 and in the step 5 of the page 265 when i try of to set Connected property to true, i get this error: 1. [FireDac][Comp][Clnt]-340. Driver ID is not defined. Set TFDConnection.DriverName or Add D...

Web resources about - Bug with pbByNumber [XE8 Update 1 + FireDAC + SQLite + Array DML] - embarcadero.delphi.firedac

Resources last updated: 12/12/2015 7:49:01 PM