Page 1 of 1
MyLoader Problems...
Posted: Tue 10 Oct 2006 09:22
by meszarosistvan
Hi.
I have some probem with the MyLoader. I have a very large database...
1: Direct mode is not correct, Load allways fail (after about 1..2 000 000
records).
2: In normal mode everithing works, except the MyLoader.CreateColumns
say "connection lost to mysql server". You may repaired this problem with
the MyQuery.
3: I have seen you disconnect and connect after the load. Something
is not good, too. I have to write MyConnection.Active:=False; MyConnection.Active:=True; to get it works.
Regards.
Posted: Tue 10 Oct 2006 10:00
by Antaeus
We could reproduce none of the problems you have reported.
Please supply us following information
- Exact version of Delphi, C++ Builder or Kylix
- Exact version of MyDAC. You can see it in About sheet of TMyConnection Editor
- Exact version of MySQL server and MySQL client. You can see it in Info sheet of TMyConnection Editor
> In normal mode ...
Please specify what do you mean under "normal mode".
Try it...
Posted: Thu 19 Oct 2006 10:24
by meszarosistvan
Hi!
I use Delphi 6 Enterprise (6.24 update pack 2) with your component
4.40.0.18. Here is a test program, it cause
'Can't connect to MySQL server on 'localhost' (10061)'#$D#$A'Socket error on connect. WSAGetLastError return 10048($2740)'
exception when MyLoader.CreateColumns.
Set only the username and password....
procedure TMainForm.StartMyLoaderTestBitBtnClick(Sender: TObject);
const nTableMax:Integer=50;
var cS:String;
var nN:integer;
begin
RandSeed:=0;
MyConnection.Database:='';
MyConnection.Connected:=True;
//Drop Previous Test Schema
MyCommand.SQL.Clear;
MyCommand.SQL.Add('drop database MyLoaderTest');
try
MyCommand.Execute;
except
end;
//ReBuild Schema
MyCommand.SQL.Clear;
MyCommand.SQL.Add('create database MyLoaderTest');
try
MyCommand.Execute;
except
end;
//Connect To The New Schema
MyConnection.Connected:=False;
MyConnection.Database:='MyLoaderTest';
MyConnection.Connected:=True;
//Build Test Tables
for nN:=0 to nTableMax-1 do
begin
MyCommand.SQL.Clear;
MyCommand.SQL.Add('create table TESTTABLE'+IntToStr(nN));
MyCommand.SQL.Add('(');
MyCommand.SQL.Add(' DV'+IntToStr(nN)+'1 VARCHAR(100),');
MyCommand.SQL.Add(' DV'+IntToStr(nN)+'2 VARCHAR(100),');
MyCommand.SQL.Add(' DV'+IntToStr(nN)+'3 VARCHAR(100)');
MyCommand.SQL.Add(')');
MyCommand.Execute;
end;
//Let's Rock
for nN:=0 to 100000 do
begin
MyLoader.TableName:='TESTTABLE'+IntToStr(Random(nTableMax));
try
MyLoader.CreateColumns;
except
on E:Exception do
ShowMessage('Brakepoint This!!! '+E.Message);
end;
end;
MyConnection.Connected:=False;
ShowMessage('Finished!');
end;
Posted: Thu 19 Oct 2006 13:38
by Antaeus
Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next MyDAC build. If you are user of MyDAC Professional version, we can provide you with piece of code to fix the problem.