[Zope-DB] Problem selecting Oracle LOB's
Matthew T. Kromer
matt@zope.com
Tue, 19 Mar 2002 11:19:53 -0500
Jorge O. Martinez wrote:
> Matt:
>
> You are absolutely right. I looked at the source, and this is coming
> back as well:
>
> <tr>
> <td>44</td> <--- THIS IS WHAT I SAW
> <td><Products.DCOracle2.db.LobLocator instance at 996494></td>
> (DIDN'T SEE THIS)
> </tr>
>
> I'll try what you suggest. One question though. How do I call the
> 'select' method? Does this look correct to you:
>
> <dtml-in select>
> <dtml-var Products.DCOracle2.db.LobLocator>
> </dtml-in>
>
> Thanks for your quick and accurate response,
>
> Jorge M.
>
Hmm -- the select method?
There's the select statment in your SQL method -- I think that's what
you mean; so if you have a SQL method "myquery" from a Python script you
results = context.myquery(parm1=value1, parm2=value2, parm3=value3) # etc
for result in results:
print result['column1']
print result['column2']
lob = result['lobcolumn']
lobvalue = lob.read()
etc...
--
Matt Kromer
Zope Corporation http://www.zope.com/