Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm connecting to Oracle via Win32::ODBC. I've tried increasing the buffer size via
$db->SetMaxBufSize(1000000);
However, when I try to insert a big chunk of text into a clob field (which is less than 1MB), I still get the error "string literal too long". What should I be doing? Thanks

Replies are listed 'Best First'.
Re: Oracle: string literal too long
by screamingeagle (Curate) on Jul 18, 2002 at 22:58 UTC
    the documentation for win32::odbc says:
    The working limit to the size of a field is 10240 bytes. This can be r +aised (if needed) to a maximum of 2,147,483,647 bytes. This maximum l +imit can be raised only by recompiling.
    here's a link to the relevant page Win32::ODBC
      As I said in the beginning, I had raised the limit via
      $db->SetMaxBufSize(1000000);
      It still doesn't work.
Re: Oracle: string literal too long
by CubicSpline (Friar) on Jul 18, 2002 at 20:14 UTC
    The DBI documentation indicates that "When trying to insert long or binary values, placeholders should be used since there are often limits on the maximum size of an INSERT statement..."

    So maybe you could try something like this:

    $sth = $dbh->prepare(q{INSERT INTO table (BigChunk) VALUES (?)}); $sth->execute( $big_chunk );
    I can't try this here, but give it a go and see if it works.

    ~CubicSpline
    "No one tosses a Dwarf!"

      I'm using Win32::ODBC, not DBI?