Re: [suse-oracle] Blob, OCI and C

From: Thies C. Arntzen (thies@thiesos.org)
Date: Fri Feb 15 2002 - 02:27:44 PST

  • Next message: Claudia Kotlarov: "[suse-oracle] Antwort: Re: [suse-oracle] Installing 8.1.7r3 Linking Fails"

    Date: Fri, 15 Feb 2002 11:27:44 +0100
    From: "Thies C. Arntzen" <thies@thiesos.org>
    Message-ID: <20020215102744.GA30653@schnuffel.thieso.net>
    Subject: Re: [suse-oracle] Blob, OCI and C
    

    On Tue, Feb 12, 2002 at 01:07:28PM +0100, jferruz@isasa.es wrote:
    > I'd like insert a file in a clob column.
    >
    > All examles I see, follow the next steps:
    >
    > /* Initialize */
    > INSERT INTO FOO VALUES (EMPTY_CLOB(), EMPTY_BLOB(), :1)
    > OCIStmtPrepare (....)
    > OCIBindByPos (....,1,.....)
    >
    > /* Select locator for update */
    > SELECT A, B FROM FOO WHERE C = :1 FOR UPDATE
    >
    > /* Insert file */
    > OCILobWrite(..........)
    >
    > Can I insert directly?
    > How can I get locator for not updating?
    >
    > Thanks in advance,

        either use the returning clause in your inser:

        INSERT INTO FOO VALUES (EMPTY_CLOB(), EMPTY_BLOB(), :1)
        returning blob_field into :blob

        or create a temporary LOB-Locator.

        re,
        tc

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: suse-oracle-unsubscribe@suse.com
    For additional commands, e-mail: suse-oracle-help@suse.com
    Please see http://www.suse.com/oracle/ before posting



    This archive was generated by hypermail 2.1.0 : Fri Feb 15 2002 - 02:25:56 PST