Page 1 of 1

TUniLoader minimum number of rows (MySQL)

Posted: Fri 13 Jul 2012 15:33
by miguelenguica
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!

Re: TUniLoader minimum number of rows (MySQL)

Posted: Mon 16 Jul 2012 11:42
by AndreyZ
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.