Subject Re: [ib-support] get overflow error when selecting from table with blob
Author Claudio Valderrama C.
""andycolson"" <andycolson@...> wrote in message
news:a53fel+94s6@......
> I just changed a varchar to a blob, now this sql statement gives the
> error: "Overflow occured during data type conversion. conversion
> error from string "BLOB"

SQL> select sum(hours) from times group by remarks;
SUM
=====================
Statement failed, SQLCODE = -413
conversion error from string "BLOB"

This is for the prod version. The debug version calls the assert() macro and
finishes itself.


> Remarks used to be a varchar 500, but I switched to blob. I'm
> running Firebird 1 RC2 (Version is LI-T6.2.681 Firebird RC 2)

When you change from varchar to blob and vice-versa, you should define
beforehand how you intend to use the field to not get caught in surprises.


> I backuped the database and restored it on an IB6.0 server and the
> query seemed to work ok.

Are you really sure that IB6 handles it correctly?
Tried in v6.0.0.627:

SQL> show version;
ISQL Version: WI-T1.0.0.743 Firebird Release Candidate 2
Firebird/x86/Windows NT (access method), version "WI-V6.0.0.627"
on disk structure version 10.0

SQL> select sum(hours) from times group by remarks;

=====================
Statement failed, SQLCODE = -413
conversion error from string "BLOB"

At least Firebird puts the column name (SUM) as a bonus.
:-)

Both the engines can do:

SQL> select sum(hours) from times order by remarks;

=====================
11.55

with the sole difference that FB names the column SUM and IB leaves it
blank. But this is nonsense still for the app developer or the end user.

C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing