Help for DCOracle examples
Joe Murray
jmurray at agyinc.com
Thu Jan 25 13:54:19 EST 2001
On a related DCOracle note...
I am having problems Connecting to a database using DCOracle from a
Python CGI script. I get the following error in my httpd logs:
OCI_ERROR at oci_8.c:275
Error while trying to retrieve text for error ORA-12545
A code snippet follows:
try:
db = DCOracle.Connect('oracleuser/oraclepassword')
return HTMLgen.Paragraph('Connected to DB.')
except:
return HTMLgen.Paragraph('Connection to DB DENIED!')
Peculiar thing follows:
Script works from command line (ie, connects to OracleDB no problem).
But not via browser... hmmm. Is there some permissions problem I'm
missing?
Thanks,
joe
Jose Martin wrote:
>
> import Buffer, oci_, sys <=== Error Must Import DCOracle
> dbc=Connect("weiming/weiming")
> c=dbc.cursor()
> --------------------------------------------------------------------
>
> try this...
>
> import DCOracle
> dbc=DCOracle.Connect(connectstring)
>
> cur=dbc.cursor()
>
> cur.execute('SELECT TABLE_NAME FROM TABS')
> res=cur.fetchall()
>
> for table in res:
> print table[0]
>
> --
> http://mail.python.org/mailman/listinfo/python-list
--
Joseph Murray
Bioinformatics Specialist, AGY Therapeutics
290 Utah Avenue, South San Francisco, CA 94080
(650) 228-1146
More information about the Python-list
mailing list