[DB-SIG] Re: oracle db module status

Richard Jones richard.jones@fulcrum.com.au
Fri, 04 Dec 1998 10:17:11 +1100

[cross-posted to DB-SIG, in case someone there cares. I don't subscribe to 
DB-SIG though, so please CC me any relevant followups]

>   richard.jones@fulcrum.com.au wrote:
> >     I need an interface to Oracle 8, and am finding that most of the oracle
> > modules out there (except the Digicool one, but I don't have the option of
> > paying for it) are a little out of date with respect to Oracle 8.
> I've used the oracledb module (the freebie) from digicool
> with oracle 8, and after the horrible fight to get it linked
> it seemed to work without a problem.  I also know someone
> who is using Anthony Baxter's version and it seems to work
> good for him. 

    Well, to expand a little on the post I made... I have Anthony Baxter's 
oracledb module linked fine with 8.0.5 now. I patched the Makefile to include 
${ORACLE_HOME}/rdbms/lib/env_rdbms.mk and then linked with ${TTLIBS}. My 
problem was that my test select wasn't working properly. After investigating 
further, I find that a "select * from tab" only returns a row at a time when 
fetchall()'ed, but a regular table that I make will return all rows on a 
fetchall(). This is all a bit dodgy, and may result in the killing of Python 
from the project I'm working on.

   Now for the icky bit... looking in the 8.0.4 documentation for OCI, I find 
that all the functions used in oracledb are now deprecated. *sigh*

> Conceivably (dunno) it should be possible to
> use M.A.Lemburg's mxODBC or (on win32) Bill Tutt's odbc module
> or, if you diverge from Greg Stein's dbapi, Sam Rushing's
> more direct odbc binding too on win32.  Dunno if this helps.
> It's all very confusing.

    ODBC isn't an option, unfortunately.

> The problem with diversity is it's so diverse, when all
> you wanna do is get the job done!  I think I posted a makefile
> for oracle8/oracledbmodule to the dbsig many months ago.

    Well, here's the snippet that works for me: this is the last few lines of 
the Makefile...

include ${ORACLE_HOME}/rdbms/lib/env_rdbms.mk
oradbmodule.o: $(srcdir)/oradbmodule.c; $(CC) $(CCSHARED) $(CFLAGS)  -I. -I. -c
dbi.o: $(srcdir)/dbi.c; $(CC) $(CCSHARED) $(CFLAGS)  -I. -I. -c $(srcdir)/dbi.c
oracledbmodule$(SO):  oradbmodule.o dbi.o; $(LDSHARED)  oradbmodule.o dbi.o  -L$
{ORACLE_HOME}/lib ${TTLIBS} -lsocket -lgen -ldl -lc -laio -lm -o oracledbmodule$

    (Note that the oradbmodule.o, dbi.o and oracledbmodule$(SO) lines should be 
1 line - but my mail program might break them)


Richard Jones,  developer for the Fulcrum Consulting Group.   (03) 9621 2100 
http://www.fulcrum.com.au/         http://alumni.dgs.monash.edu.au/~richard/