[Zope] Calling mxODBC from an External Method
Cheuk Cheng
Cheuk_Cheng@Phoenix.com
Wed, 12 Apr 2000 18:58:57 -0700
I''ve been looking for a Zope solution (on NT) for Oracle 8.0.5 (on Solaris)
and blob insertion in the last few days. So far I found that mxODBC is the
only thing has full support for BLOB manipulation. I can insert LOB/BLOB
into Oracle when I compiled my Python along. However, I'm having problems
in integrating mxODBC package with Zope. After searching through the
mailing list archive, I found a similar problem posted by Jason Cunliffe.
By following to the suggestions, I installed mxODBC package and DateTime
module under the Shared directory and keep my external method in the
Extensions directory. In my external method, I do
Import Shared.DateTime
import Shared.ODBC
from Shared.ODBC import Windows
from Shared.ODBC import
dbc =
Shared.ODBC.Windows.Connect('user','password','dsn',clear_auto_commit=1)
When the external method is executed from Zope, I got an error message
"Error Type:AttributeError ErrorValue: Connect". It seems like Connect
cannot be resolved but I didn't get any complain on the imports. If I
successfully imported the module, shouldn't I have access to the connection
method? Can someone please help? BTW, the directory structure under Shared
is as follow:
Shared/
|
|----DateTime/
| |
| -----mxDateTime/
|
----ODBC/
|
|-----mxODBC/
|
|-----Oracle/
|
-----Windows/
Also, if I anyone has found a solution in dealing with Oracle blob, please
share your thoughts.
Thanks
-Cheuk