It turns out the code to put the clob into the datebase was incorrect

The call was
        db_dml update_trans {
                update bv_transactions
                set transaction = :xml
                where transaction_id = :transaction_id
                returning transaction into :1
        } -clobs [list $xml]

but should be

        db_dml update_trans {
                update bv_transactions
                set transaction = empty_clob()
                where transaction_id = :transaction_id
                returning transaction into :1
        } -clobs [list $xml]

however it's interesting that the incorrect code kills the database instance.
It's also interesting that the first code works until the XML document becomes
larger than 64k

Barry Books wrote:

> Hello,
>
> I'm working on an Oracle driver problem and I'm curious if anyone else has
> seen it. I'm running the win32 version 2.4 driver with Oracle 8.1.6 on NT
> (client and server)
>
> The problem is if I try and update a column with a clob greater that 64k I
> get
>
> [07/May/2001:16:16:29][610.601][-conn0-] Notice:
> H:\src\aD\root\oracle-driver\ora8.c:4538:<unknown>:
>  ns_ora clob_dml:  binding variable xml
> [07/May/2001:16:16:29][610.601][-conn0-] Notice:
> H:\src\aD\root\oracle-driver\ora8.c:4538:<unknown>:
>  ns_ora clob_dml:  binding variable transaction_id
> [07/May/2001:16:16:29][610.601][-conn0-] Notice:
> H:\src\aD\root\oracle-driver\ora8.c:4538:<unknown>:
>  ns_ora clob_dml:  binding variable 1
> [07/May/2001:16:16:29][610.601][-conn0-] Notice:
> H:\src\aD\root\oracle-driver\ora8.c:4543:<unknown>:
>  bind variable 1 is a lob
> [07/May/2001:16:16:29][610.601][-conn0-] Notice:
> H:\src\aD\root\oracle-driver\ora8.c:2763:<unknown>:
>  entry
> [07/May/2001:16:16:29][610.601][-conn0-] Error: SQL():
> H:\src\aD\root\oracle-driver\ora8.c:4601:<unk
> nown>: error in `OCIStmtExecute ()': ORA-01480: trailing null missing from
> STR bind value
>
> SQL:
>                 update bv_transactions
>                 set transaction = :xml
>                 where transaction_id = :transaction_id
>                 returning transaction into :1
>
> At first I thought I had not set LobBufferSize but the logs contain:
>
> [07/May/2001:16:02:07][610.218][-main-] Notice: modload: loading
> 'd:/acs/aol32/bin/ora8.dll'
> [07/May/2001:16:02:07][610.218][-main-] Notice: ora8 driver LobBufferSize =
> 500000
> [07/May/2001:16:02:07][610.218][-main-] Notice:
> H:\src\aD\root\oracle-driver\ora8.c:920:<unknown>: e
> ntry (hdriver 00417640, config_path ns/db/driver/ora8)
> [07/May/2001:16:02:07][610.218][-main-] Notice: Loaded ArsDigita Oracle
> Driver version 2.4, built on
>  16:05:38/Nov 14 2000
>
> The config section:
>
> ns_section ns/db/driver/ora8
> ns_param Debug true
> ns_param LobBufferSize 500000
>
> All of this would not be so bad but when this happens the Oracle instance
> quits without even putting anything in the event log
>
> The dml statement is:
>         db_dml update_trans {
>                 update bv_transactions
>                 set transaction = :xml
>                 where transaction_id = :transaction_id
>                 returning transaction into :1
>         } -clobs [list $xml]
>
> Has anyone else seen this?
>
> Thanks
> Barry

Reply via email to