in reply to Re: Cannot insert into MS Access Memo field with DBI
in thread Cannot insert into MS Access Memo field with DBI

I don't know if something changed in subsequent versions of DBI:ODBC, but I got this to work only after counting the order of my fields starting with 1 instead of 0. I.E. for the above example to work for me it would need to be:
$sth->bind_param( 5, $publicmesage, DBI::SQL_LONGVARCHAR ); $sth->bind_param( 6, $privatemesage, DBI::SQL_LONGVARCHAR );

Replies are listed 'Best First'.
Re^3: Cannot insert into MS Access Memo field with DBI
by auntie_anne (Initiate) on Jul 22, 2009 at 18:42 UTC
    This sounds crazy but I had this problem trying to put a string into the ms access memo field and after pulling out my hair I got the data in by putting it in an array. edit: array is NOT NEEDED. just do the blob support i.e.:

    $dbh->{LongReadLen} = 20000; #(change 20000 to your needs)
    $dbh->{LongTruncOk}=1; #(truncate at 20000)

    ***update: the blob support fixes it for going in too so the array is not needed. you can put the big string in if LongReadLen is active. d'oh.