FW: [DB-SIG] newbee help with DCOracle - Problem solved.

Turney, James jtt@hnc.com
Mon, 27 Nov 2000 14:09:56 -0800


After doing some searching of comp.lang.python I came upon several other
people who had the same issue.  
The problem was solved by correctly adding the dcoracle directory to my
PYTHONPATH and making sure the .so's created by the DCOracle make were also
in the dcoracle directory.
  
The confusion was caused by the fact the test program for DCOracle does not
import the DCOracle module (as recommend) but directly imports the OCI_ and
Buffer modules.   It appears that most people (me included) used the test
program a starting point. Unfortunately, it was bad example. 

Thanks to those people who responded.  With your help I was able to figure
it out.


Thanks.
Jim Turney
jtt@hnc.com


-----Original Message-----
From:	Turney, James 
Sent:	Monday, November 27, 2000 12:45 PM
To:	
Subject:	RE: [DB-SIG] newbee help with DCOracle

Thanks for quick response....   
By the way I not a developer so any extra details are appreciated.

I think my problem is that I don't have the DCOracle package installed
correclty?  I copied the .so's created by the make  to the dcoracle
directory as specified in the README.txt in src dir.  I added the dcoracle
directory to my Unix path and  my pythonpath.  
What else do I need to be able to import dcoracle? 

Thanks again,



 Jim Turney
jtt@hnc.com <mailto:jtt@hnc.com> 


	-----Original Message-----
	From:	Andreas Jung [SMTP:andreas@andreas-jung.com]
<mailto:[SMTP:andreas@andreas-jung.com]> 
	Sent:	Monday, November 27, 2000 10:03 AM
	To:	Turney, James
	Cc:	db-sig@python.org <mailto:db-sig@python.org> 
	Subject:	Re: [DB-SIG] newbee help with DCOracle

	On Mon, Nov 27, 2000 at 09:57:01AM -0800, Turney, James wrote:
	> I have managed to get DCOracle1.3.2 to compile and link on a
Solaris 2.6
	> system using Oracle 7.3.4.
	> The test program that comes with DCOracle seems to open a
connection to the
	> database.  When I attempt to use any of the methods Connection
objects are
	> supposed to support I get a message similar to the following:
"Connection
	> object has no attribute".
	> For example, if the following is run from the python interpreter 
	> 
	> 
	> import Buffer, oci_, sys
	> 
	> print 'Import succeeded'
	> 
	> dbc=oci_.Connect('dbuserid/dbpassword)
	> 
	> dbc.close()
	> 
	> The execution of the dbc.close() always results in the following
message:
	> AttributeError: 'Connection' object has no attribute 'close'
	> 
	> I have placed the DCOracle package (including the shared objects
created) in
	> my path and LD_LIBRARY_PATH.
	> 

	Please read the docs. It is not suggested to use directly the oci_
module.
	Instead import the DCOracle package - this should fix your problem.

	Cheers,
	Andreas