Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Error thrown when trying to update a 'text' field
Date: Aug 28 2009 6:36PM
Sybase definitely treats a TEXT column as a "blob", and as the
DBD::Sybase docs mention it is not possible to pass such a column as a
You must pass the values directly as raw SQL text, or use the text/
image API provided by DBD::Sybase.
On Aug 28, 2009, at 4:16 PM, Emmanuel Quevillon wrote:
> I didn't know to which mailing list I should send this message, so
> I'm cc'ing to DBIx::Class as it uses this framework. However, the DB
> is Sybase 12.5.3.
> The thing is that I want to do a large update of a certain amount of
> rows. What I've to do is replace some kind of a date string into a
> text field. If I send the query generated by DBIx::Class by hand to
> the server, it works perfectly and to the update.
> However, if I let the perl code (DBIC) doing it itself, I get the
> following error thrown by Sybase:
> DBI Exception: DBD::Sybase::db prepare failed: Server message
> number=2782 severity=16 state=1 line=1 server=CRBIPTEST
> procedure=DBD2 text=An untyped variable in the PREPARE statement
> 'DBD2' is being resolved to a TEXT or IMAGE type. This is illegal in
> a dynamic PREPARE statement.
> [for Statement "UPDATE produit SET HISTORIQUE = ? WHERE (
> CODE_PRODUIT_CRBIP = ? )"] at
> /usr/local/lib/perl5/site_perl/5.8.8/DBIx/Class/Schema.pm line 1025
> Here is the request generated:
> UPDATE produit SET HISTORIQUE = ? WHERE ( CODE_PRODUIT_CRBIP = ? ):
> '1993 R. Landen
> 1993 - 1998 M.M. Lecadet IP
> 1998 - 2001 B. Papierok IP
> 2001 - 2008 J.F. Charles IP
> 2009 C. Bizet IP', 'CRBIPbIEBC1048'
> So I though the problem could come from the fact that the text field
> contains some carriage return and causes Sybase not to understand
> correctly the request?
> On colleague also told me it could come from the fact that DBI
> treats text field as BLOB????? Never head of this.
> If someone could light my lantern.....
> Thanks in advance
> Emmanuel Quevillon
> Biological Software and Databases Group
> Institut Pasteur
> +33 1 44 38 95 98
> tuco at_ pasteur dot fr
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
"A successful [software] tool is one that was used to do something
undreamed of by its author." -- S. C. Johnson