TUniLoader minimum number of rows (MySQL)

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
miguelenguica
Posts: 18
Joined: Mon 11 Apr 2011 15:28

TUniLoader minimum number of rows (MySQL)

Post by miguelenguica » Fri 13 Jul 2012 15:33

Hi. Is there a minimum number of rows for TUniLoader to save into the database?

I'm finding that when the number is low (below 1.000 maybe) the data does not get inserted into the table. If the number is higher all goes well.

Can you advise about the specific options for MySQL?

The documentation regarding this component doesn't help much.

Thank you!

AndreyZ

Re: TUniLoader minimum number of rows (MySQL)

Post by AndreyZ » Mon 16 Jul 2012 11:42

Hello,

There is no restriction for the number of records to load to the server. Using TUniLoader, you can load any number of rows to the server. Here is an example that demonstrates it:

Code: Select all

procedure TMainForm.ButtonClick(Sender: TObject);
begin
  UniLoader.TableName := 'dept'; // the dept has three columns: deptno INT(11), dname VARCHAR(14), loc VARCHAR(13)
  UniLoader.Load;
end;

procedure TMainForm.UniLoaderPutData(Sender: TDALoader);
var
  i: integer;
begin
  for i := 1 to 5 do begin
    Sender.PutColumnData(0, i, i);
    Sender.PutColumnData(1, i, IntToStr(i));
    Sender.PutColumnData(2, i, IntToStr(i));
  end;
end;
Please try using this code and check if you can insert five records to your table.

Post Reply