Menu

Problem with oratcl read

Help
2006-07-07
2013-04-16
  • Martin Jenkins

    Martin Jenkins - 2006-07-07

    Hi again; probably another stupid error.
    Now I can write clobs successfully, I want to read them back.

    Code same as before, but with just a simple addition - read:

    set lobid [oralob alloc $db_handle -table "t_tpc_node_configuration" -column "configuration_file" -rowid $newrowid]

    oralob write $lobid -datavar data
    oralob read  $lobid -datavar newdata

    The write succeeds, and I can see the data using sqldeveloper.

    However, the read fails:
    oralob read: {ORA-21560: argument 2 is null, invalid, or out of range
    ORA-06512: at "SYS.DBMS_LOB", line 715
    ORA-06512: at line 1} ORA-21560: argument 2 is null, invalid, or out of range
    ORA-06512: at "SYS.DBMS_LOB", line 715
    ORA-06512: at line 1
        while executing
    "oraplexec $stm  $pl  :rid $rowid  :lob_amt $siz  :lob_pos $pos  :lob_str {} "
        while executing
    "oralob read $lobid -datavar newdata"

    Any advice would be very much appreciated!

     
    • Martin Jenkins

      Martin Jenkins - 2006-07-10

      After going through the oralob.test file, I noted this configuration line:

      oraconfig $lob_stm lobpsize 32500

      Adding that sorted the problem out.

       
      • Robert Parker

        Robert Parker - 2008-07-17

        Thanks, that oraconfig works for me too.

        (looks like a subtle change between 4.3 and 4.4 means the oraconfig is required)

         

Log in to post a comment.