You have only posted insert code and you indicate it's when you are setting
the text field, therefore LongReadLen won't help.

What version of the OOB are you using?

I just saw Martin's post, and I would like to be copied on anything sent to
him, so that I can track it, too.

Jeff

>
>
> Hello
>
> I'm experiencing odd problems using DBD::ODBC - Easysoft OOB to connect to
> an SQL server.
> I have seen on forums and mailing list archives that other people have
> experienced a similar
> problem on varied platforms but never found a solution outlined...
>
> I have just ported some scripts from a windows machine to a linux machine
> and am getting
> truncations when trying to set a text field.
>
> [Microsoft][ODBC SQL Server Driver]String data, right truncation
> (SQL-22001)(DBD: st_execute/SQLExecute err=-1)
>
> Trying to do the exact same thing on the windows machine will
> work without a
> hitch.
> The windows version used: $dbh->{LongReadLen} = 512 * 1024; and never had
> any problems
> I have upped the limit on the unix version of it and cranked it
> high, yet i
> still get
> truncation - and the amount of text in question is maybe 1000
> words, so well
> below the
> size
>
> I have tried using:
> --------------
> [...]
> $dbh->{LongReadLen} = 512 * 1024;
> [...]
>     eval
>     {
>               # add text article
>               my $sqlstatement = "Update Article set Text=? where
> articleid = $articleid";
>               my $sth = $dbh->prepare("$sqlstatement");
>               $sth->bind_param(1, $cgitext, {SQL_LONGVARCHAR=>1});
>               $sth->execute() || die("Can't execute SQL Statement:
> $DBI::errstr\n"."$sqlstatement");
>               $dbh->commit();
>     };
> [...]
> ---------------
>
> and:
> ---------------
> [...]
> $dbh->{odbc_default_bind_type} = 0;
> $dbh->{LongReadLen} = 1024 * 1024; # this is a lot!!!
> [...]
>     eval
>     {
>               # add text article
>               my $sqlstatement = "Update Article set Text=? where
> articleid = $articleid";
>               my $sth = $dbh->prepare("$sqlstatement");
>               $sth->bind_param(1, $cgitext); #, {SQL_LONGVARCHAR=>1}
>               $sth->execute() || die("Can't execute SQL Statement:
> $DBI::errstr\n"."$sqlstatement");
>               $dbh->commit();
>     };
> [...]
> ---------------
>
> I tried increasing the LongReadLen limit and it does help a little, (even
> though it is only for read).
> Yet even when the size i put there is gigantic (1024 * 1024 *
> 1000) it still
> refuses a 3 page text... I can up it until the system complains it cannot
> allocate any more memory, yet it still truncates basic text.
>
> Any idea what I am missing?
>
> Joelle Nebbe
>
>
> _______________________________________________________________________
> Any opinions expressed in the email are those of the individual and not
> necessarily the company. This email and any files transmitted with it
> are confidential and solely for the use of the intended
> recipient.   Please
> note that communications sent by or to any person through our computer
> systems may be viewed by other employees of ours.  Email traffic may be
> monitored.
>
> If you are not the intended recipient or the person responsible for
> delivering to the intended recipient, be advised that you have received
> this email in error and that any use is strictly prohibited.
>
> If you have received this email in error please notify the IT manager
> by telephone on 0113 243 2701
> _______________________________________________________________________
>


Reply via email to