If we attempt to modify a table with text field from Perl:
my $sth = $dbh->prepare("update table_with_text_field set text_field=? where pk=?");DBD::Sybase fails with error:
ct_result(ct_dynamic(CS_PREPARE)) returned -205 at
.../site/lib/DBD/Sybase.pm line 133.DBD::Sybase::Database prepare failed:
Server message number=2782 severity=16 state=1 line=1 server=tst procedure=DBD5
text=An untyped variable in the PREPARE statement 'DBD5' is being resolved
to a TEXT or IMAGE type. This is illegal in a dynamic PREPARE statement.
This happens because one cannot use prepared statements with text or image data.The documentation
perldoc DBD::Sybase
says that IMAGE and TEXT datatypes can not be passed as parameters using ?-style placeholders,and placeholders can't refer to IMAGE or TEXT columns. This is a limitation of the TDS protocolused by Sybase, not a DBD::Sybase limitation.Read more