Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: DB

blobs and dtml-sqlvar

 

 

Zope db RSS feed   Index | Next | Previous | View Threaded


edeleflie at gmail

Jun 1, 2007, 4:58 PM

Post #1 of 2 (1131 views)
Permalink
blobs and dtml-sqlvar

All,

I'm using MySQLDBA, and I've got a Z SQL Method like this:

select * from myTable where someValue=<dtml-sqlvar myValue type=string>

The issue being that 'myValue' is actually a Hex value in a Blob
column. The only types possible for dtml-sqlvar seem to be string and
int (as far as I can tell).

I noticed that when I use 'type=string' the value is always placed in
inverted commas (and so MySQL thinks it is a string and rejects
it).... and when I put 'type=int' the Hex value is rejected by Zope.

Is it possible that MySQLDBA can not handle blobs / Hex values at all?
I'm confused that dtml-sqlvar only sees 2 types of data.

Can anyone help? ...

Etienne
_______________________________________________
Zope-DB mailing list
Zope-DB[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-db


ahumboldt at humboldt

Jun 4, 2007, 2:26 AM

Post #2 of 2 (1040 views)
Permalink
Re: blobs and dtml-sqlvar [In reply to]

Hello,

First of all, if I am not in a mistake, your problem comes because of
Zope and his Z SQL Methods, and the MySQLDBA Database Adapter (like
other Database Adapters) can't fix it

When I have problems like yours, I think the fastest choice is to use
an ordinary <dtml-var> tag and give your application the functionality
of improving security of it, because that is the main difference
between <dtml-sqlvar> and <dtml--var>.

Anyway, I agree with you, Z SQL Methods (or documentation if not) need
to be improved.

Hoping to be helpful (and sorry for my poor english)



El 02/06/2007, a las 0:58, e deleflie escribió:

> All,
>
> I'm using MySQLDBA, and I've got a Z SQL Method like this:
>
> select * from myTable where someValue=<dtml-sqlvar myValue type=string>
>
> The issue being that 'myValue' is actually a Hex value in a Blob
> column. The only types possible for dtml-sqlvar seem to be string and
> int (as far as I can tell).
>
> I noticed that when I use 'type=string' the value is always placed in
> inverted commas (and so MySQL thinks it is a string and rejects
> it).... and when I put 'type=int' the Hex value is rejected by Zope.
>
> Is it possible that MySQLDBA can not handle blobs / Hex values at all?
> I'm confused that dtml-sqlvar only sees 2 types of data.
>
> Can anyone help? ...
>
> Etienne

_______________________________________________
Zope-DB mailing list
Zope-DB[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-db

Zope db RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.