[Zope] uploading from client PC in MySQL thru ZSQL
Didier Georgieff
Didier.GEORGIEFF@agriculture.gouv.fr
4 Jul 2000 11:47:31 +0100
Hello,
I'm trying to "import" a CSV text file for feeding a MySQL database.
I have :
* DTML method including :
<form method="post" action="import" enctype="multipart/form-
data">
<input type="file" name="loadFileAnnu">
<input type="submit" value="Import File in MySQL">
</form>
* ZSQL method 'import'
parameter : loadFileAnnu
query template :
LOAD DATA LOCAL INFILE '<dtml-var loadFileAnnu>'
INTO TABLE annuaire FIELDS TERMINATED BY ';'
when i process the form, i always get the import/manage_testForm
and if i try to upload the (local on my PC) file thru this, i get an
MySQL error
Error, _mysql.InterfaceError: (0, "File 'D:/AnnuaireTest.csv' not
found (Errcode: 2)")
SQL used:
LOAD DATA LOCAL INFILE 'D:/Data/SIT67/AnnuaireTest.csv'
INTO TABLE annuaire FIELDS TERMINATED BY ';'
Am i doing something wrong or is it impossible to load/import in
MySQL from the local file (so i should upload the file on the server
then load into MySQL) ??
Thanks in advance for any tip or info.
--
Didier Georgieff
DDAF du Bas-Rhin - Cellule SIG
2, rue des Mineurs 67070 Strasbourg Cedex
tél : 03.88.25.20.33 - fax : 03.88.25.20.01
email : didier.georgieff@agriculture.gouv.fr
GéoWeb http://10.67.90.3 (Intranet Agriculture)
GéoWeb http://sertit10.u-strasbg.fr (Internet)