Re: [Zope] ZSQL newbie question

2000-06-21 Thread Dieter Maurer

kamon ayeva writes:
 > I have a text file object containing data I want to use to update a MySQL 
 > table.
 > I can get the data using the LocalFS object product and the howto from 
 > jfarr, but I don't know how to use ZSQL method and DTML method to inject 
 > this data in the table.
You should know (or learn) a bit of SQL, especially the SQL
"insert" command. You should have had a look into
the Z SQL Methods User Guide (--> zope.org/Documentation).

After that, only a tiny bit is missing:

  you file object will provide a method "read".
  You can use it to return the file content as a string.
  You put this string on a parameter position for
  an SQL insert. Something like:
 


  As you probably expect, I used "sqlinsert" for
  your Z SQL method that uses the SQL "insert" command to
  insert a new row into a table and "file" for your
  file object. The "..." stand for the other arguments
  and values, that define the remaining fields in your
  table.

  Note the "...". These double quotes are essential.



Dieter

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




[Zope] ZSQL newbie question

2000-06-21 Thread kamon ayeva

Hi,

I have a text file object containing data I want to use to update a MySQL 
table.
I can get the data using the LocalFS object product and the howto from 
jfarr, but I don't know how to use ZSQL method and DTML method to inject 
this data in the table.
Any help would be appreciated.

Regards,
Kamon

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


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