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 : [EMAIL PROTECTED]
GéoWeb http://10.67.90.3 (Intranet Agriculture)
GéoWeb http://sertit10.u-strasbg.fr (Internet)

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to