Python and Oracle 9i

Bob Lancaster boblancaster at zxmail.com
Tue Feb 26 10:01:23 EST 2002


Andy,

Thanks for the advice.  I did check to see that the files were in the
ORACLE_HOME\oci\include directory.

I was using the pre-release version of DCOracle2, which I downloaded a
few weeks ago, and Python v. 2.1.1, which I downloaded last December.
I got rid of my old versions, and switched to DCOracle2 v.1.0, and
Python v. 2.1.2.  The release version of DCOracle2 checks for
version[0:3], just as your code did.  In the pre-release version, I
rewrote another part of the code to specifically accept version 2.1.1.
Things work a bit better, but the program crashes if I either (a)
SELECT a TIMESTAMP_WITH_TIMEZONE (I may not be interfacing properly
with the mxDateTime module) or (b) select a user-defined type. 
(Oracle is a bit nasty about arrays, unlike PostgreSQL).
INSERT, UPDATE and DELETE all work fine, even with user-defined types
and TIMESTAMP_WITH_TIMEZONE.
Not only that, but it is really hard to figure out the precise type of
a field from the description (unlike either pgdb or psycopg with
PostgreSQL).
Unfortunately, many of our customers use Oracle, and we have to
interface with a system which uses Oracle, so I probably have no other
choice but to rewrite the database in such a way as to make DCOracle2
happy.  The alternative cx_Oracle is even worse.

Thanks for your advice!
Bob

Andy Todd <andy47 at halfcooked.com> wrote in message news:<Xns91C167290C907andy47halfcookedcom at 203.109.252.31>...
> boblancaster at zxmail.com (Bob Lancaster) wrote in 
> news:b470cb58.0202250816.7839c1c4 at posting.google.com:
> 
[my (Bob L) original post snipped to save bandwidth]
> 
> Bob,
> 
> I think the DCOracle2 documentation is incorrect. All of the header and 
> library files needed to compile OCI clients for Oracle should now (Oracle8i 
> release 2 and above) be included in the %ORACLE_HOME%\oci directory on 
> Windows. For information on which components are necessary to build OCI 
> client modules have a look at the "Oracle Call Interface Getting Started 
> Release x.x.x for Windows" manual provided with your database installation. 
> Mine is for 8.1.6, ymmv. 
> 
> Something that has caught me out in the past is that I have performed a 
> server install but forgot to include the Oracle client software. This then 
> doesn't include the appropriate dlls which will result in run time errors 
> as soon as you try to call them. If you do a 'full' install of Oracle on 
> Windows this shouldn't be a problem, but if you have performed a 'custom' 
> install you may have missed out the appropriate headers and dll files and 
> that would definitely cause issues.
> 
> As far as I know you should have no problems using DCOracle2 with Python 
> 2.1.1 or 2.1.2. I'm running Python 2.1.2 as part of Zope on my Windows2000 
> machine and I have successfully managed to install DCOracle2 into that 
> environment. All I did was change line 14 of install.py from;
> 
> version = string.split(sys.version)[0]
> 
> to
> 
> version = string.split(sys.version)[0][0:3]
> 
> and everything was hunky dory. Hope this is of some help.
> 
> Regards,
> Andy



More information about the Python-list mailing list