Error thrown when trying to update a 'text' field
Emmanuel Quevillon <[email protected]> Fri, 28 Aug 2009 16:16:47 +0200
| Newsgroups | gmane.comp.lang.perl.modules.dbix-class,gmane.comp.lang.perl.modules.dbi.sybase |
|---|---|
| Organization | Institut Pasteur |
| Message-ID | <[email protected]> |
Hi, 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 Regards -- ------------------------- Emmanuel Quevillon Biological Software and Databases Group Institut Pasteur +33 1 44 38 95 98 tuco at_ pasteur dot fr -------------------------