[Zope] Re: [Formulator-general] z Sql method and data type on insert...

Denis FRERE spirou@carolo.net
Tue, 16 Oct 2001 03:44:09 +0200


Le Mon, Oct 15, 2001 at 09:28:35PM -0400, Francois Meehan pianota:
> The problem is that in the sql insert command, the following:  "<dtml-sqlvar
> instructions_recette type="blob">" is not recognized by the Z sql method.
> 
> Also, what are the valid data type for zsql method? The only one I could
> find where string or int.

You've missed float and nb.

See Zope Help - DTML reference - sqlvar

    sqlvar: Inserts SQL variables
    The type of the variable. Valid types include: string, int,
    float and nb. nb means non-blank string. The type attribute
    is required and is used to properly escape inserted
    variable.

Those are Python types, not DB types.

I guess "text" would be a judicious choice for a textarea,
but I'm not MySQL-blob user so I can't guarantee it will do.

Let us know.

Denis
-- 
Denis FRERE
P3B    : Club Python(-Zope) Belge --------- http://www.p3b.org
OS3B   : Club Open-Software(-Linux) Carolo  http://www.os3b.org 
Aragne : Python-Zope Solutions & Formations http://www.aragne.com