[Zope-dev] More on DCOracle and BLOB handling
Cheuk Cheng
Cheuk_Cheng@Phoenix.com
Wed, 12 Apr 2000 11:21:53 -0700
First I appreciated for those who responded to my original posting. So far
I still haven't found a solution but yet learned a few new things and would
like to share with everyone. For those who didn't read my previous message,
my problem was trying to use a Zope external method and doing a blob
insertion into Oracle (8.0.5 on Solaris). I'm using the DCOracle compiled
with VC6 on a NT platform. With DCOracle I could create the connection and
query the database without any problem for any kind of datatypes including
blob. When trying to perform a insertion, it keeps reporting a "invalid hex
string" error.
Now here's what I found so far. When I was searching for a solution for my
problem, I came across the mxODBC driver. I created a standalone Python
script that makes use of mxODBC driver and successfully inserted data blobs
of any size (>10M). So I thought that I could copy the mxODBC package from
python\lib\ODBC to Zope (under Shared\ODBC\) and access it via an external
method. Then I found a naming conflict with the Zope odbc driver. I went
ahead and renamed the odbc.pyd to win32odbc.pyd. Next I tried to import the
mxODBC driver in my external method as:
import Shared.ODBC
from Shared.ODBC import Windows
dbc =
Shared.ODBC.Windows.Connect('user','password','dsn',clear_auto_commit=1)
When the external method is executed, I got an error message "Error
Type:AttributeError ErrorValue: Connect". If I successfully imported
the module, shouldn't I have access to the connection method? Anyone has
any idea on what I've done wrong?
Also I would like to find out if there's anyone successfully using DCOracle
with Oracle 8.0.5 (on any platform) to insert blob. Please comment.
Thanks
-Cheuk