[imp] improved db.oci8
Brent J. Nordquist
bjn@horde.org
Wed, 18 Oct 2000 09:09:08 -0500 (CDT)
On Mon, 16 Oct 2000, mkb <mkb@ele.uri.edu> wrote:
> The db.oci8 file I posted a while ago has a problem with saving
> signatured. This new version fixes that issue.
OK, I've committed this; thanks! For future reference, if you can work
off the CVS version to make your changes, it will make them easier to
commit. Patches would be best of all. :-)
Something caught my eye; the different "imp_set_*" functions seem to have
different forms for the commit process. Shouldn't they all be the same?
Form 1:
if (!($cursor = OCIParse($conn, $sql)))
return leaveOracle($conn, $cursor, false);
else
if (!OCIExecute($cursor, OCI_DEFAULT))
return leaveOracle($conn, $cursor, false);
if (!OCICommit($conn))
return leaveOracle($conn, $cursor, false);
return leaveOracle($conn, $cursor, true);
Form 2:
OCIParse($conn, $sql);
if (!OCIExecute($cursor))
return leaveOracle($conn, $cursor, false);
if (!OCICommit($conn))
return leaveOracle($conn, $cursor, false);
return leaveOracle($conn, $cursor, true);
Form 3:
if (!($cursor = OCIParse($conn,$sql)))
return leaveOracle($conn, $cursor, false);
else
OCIExecute($cursor,OCI_DEFAULT);
if (!OCICommit($conn))
return leaveOracle($conn, $cursor, false);
return leaveOracle($conn, $cursor, true);
It seems that Form 1 does the most error checking.
--
Brent J. Nordquist <bjn@horde.org>
Yahoo!: Brent_Nordquist / AIM: BrentJNordquist / ICQ: 76158942