[DB-SIG] DCOracle - oci.error to access
Sunita Pawar
sunita@cybage.com
Mon, 21 Oct 2002 17:35:53 +0530
This is a multi-part message in MIME format.
------=_NextPart_000_046E_01C27928.4E31BB50
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
How do I look at the error that was returned in the try/except for =
DCOracle=20
I had tried
import DCOracle
try:
db =3D DCOracle.Connect(user/password@sid)
except oci.error, e:
print "Error", e
But it gives the error message:
NameError: oci
Do I ahve to import some module to access oci? Even if I have to, how do =
I access the what oci.error is?
Thanks
Sunita
------=_NextPart_000_046E_01C27928.4E31BB50
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>How do I look at the error that was returned in the try/except =
for=20
DCOracle <BR><FONT face=3DArial size=3D2>I had tried</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>import DCOracle</FONT></DIV>
<DIV>try:<BR> db =3D DCOracle.Connect(<A=20
href=3D"mailto:user/password@sid">user/<A=20
href=3D"mailto:user/password@sid">password@sid</A></A>)<BR>except =
oci.error,=20
e:<BR> print "Error", e<BR></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>But it gives the error =
message:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> NameError: =
oci</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Do I ahve to import some module to =
access oci? Even=20
if I have to, how do I access the what oci.error is?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sunita</FONT></DIV></BODY></HTML>
------=_NextPart_000_046E_01C27928.4E31BB50--