mySQL question
Ton Kuypers
tkuypers at pandora.be
Tue Dec 27 19:54:16 EST 2005
Hi,
I've seem to have a small problem using mySQL from within Revolution...
I'm trying to import a lot of data into mySQL tables.
I'm reading an export file and build a query using a repeat loop,
which basically creates a command like:
insert into Clients
(ID,Name,FirstName,LastName,Email,Country,EmailCC,Remarks) values
('480','S-P Africa','Maamoun','Allam','','1','','');"
insert into Clients
(ID,Name,FirstName,LastName,Email,Country,EmailCC,Remarks) values
('481','S-P Australia','Doug','Way','','2','','');
insert into Clients
(ID,Name,FirstName,LastName,Email,Country,EmailCC,Remarks) values
('482','S-P
Australia','Bethany','South','ethany_south at merck.com','2','','');
insert into Clients
(ID,Name,FirstName,LastName,Email,Country,EmailCC,Remarks) values
('483','S-P Austria','Peter','Guenczler','','3','','');
insert into Clients
(ID,Name,FirstName,LastName,Email,Country,EmailCC,Remarks) values
('484','S-P Austria','Gertraud','Neuberger','','3','','');
etc.
This can result is a command that inserts more then 10.000 records.
When I send each line separately, the records get inserted into the
database, but when I try to send them all together, it takes forever...
I'm using the revExecuteSQL command.
Is there a better way to import a bunch of data into mySQL?
When I copy the query and execute it from CocoaMySQL, it works fine.
Anyone any suggestions?
Regards,
Ton Kuypers
Digital Media Partners bvba
Tel. +32 (0)477 / 739 530
Fax +32 (0)14 / 71 03 04
http://www.dmp-int.com
More information about the use-livecode
mailing list