[Zope] uploading from client PC in MySQL thru ZSQL

2000-07-04 Thread Didier Georgieff

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 )




Re: [Zope] uploading from client PC in MySQL thru ZSQL

2000-07-04 Thread Andrew Kenneth Milton

+[ Didier Georgieff ]-
|
| SQL used:
| LOAD DATA LOCAL INFILE 'D:/Data/SIT67/AnnuaireTest.csv' 
| INTO TABLE annuaire FIELDS TERMINATED BY ';'

Local means local to the actual mysql client (your webserver), not local to 
your user (browser).

You could get your form to upload the file to a LocalFS directory and
then use that path the INFILE.

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

___
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 )