Subject | RE: [IBO] Fw: Firebird 2.1 and text blobs |
---|---|
Author | Jason Wharton |
Post date | 2006-11-22T18:30:25Z |
This is a replacement that can be made in the code to correct this issue.
There were also some other less obvious places where I was making this
unsafe assumption about SQLScale.
It will be in the next release.
...
begin
NewDataType := ftBoolean;
BoolList := BoolList or
( ACol.BooleanTrue <> BoolTrueChr ) or
( ACol.BooleanFalse <> BoolFalseChr ) or
( SQLLen <> 1 );
end
else
case SQLtype of
SQL_FLOAT,
SQL_FLOAT_,
SQL_DOUBLE,
SQL_DOUBLE_: NewDataType := ftFloat;
SQL_SHORT,
SQL_SHORT_,
SQL_LONG,
SQL_LONG_,
SQL_QUAD,
SQL_QUAD_,
SQL_INT64,
SQL_INT64_:
if ( SQLScale <> 0 ) then
begin
if IsCurrencyDataType then
begin
NewDataType := ftBCD;
NewDataSize := -SQLScale;
end
else
NewDataType := ftFloat;
end
else
case SQLType of
SQL_SHORT,
SQL_SHORT_: NewDataType := ftSmallint;
SQL_LONG,
SQL_LONG_: NewDataType := ftInteger;
else
{$IFDEF IBO_VCL40_OR_GREATER}
NewDataType := ftLargeInt;
{$ELSE}
NewDataType := ftFloat;
{$ENDIF}
end;
end;
SQL_TIMESTAMP,
SQL_TIMESTAMP_: NewDataType := ftDateTime;
SQL_TYPE_TIME,
...
There were also some other less obvious places where I was making this
unsafe assumption about SQLScale.
It will be in the next release.
...
begin
NewDataType := ftBoolean;
BoolList := BoolList or
( ACol.BooleanTrue <> BoolTrueChr ) or
( ACol.BooleanFalse <> BoolFalseChr ) or
( SQLLen <> 1 );
end
else
case SQLtype of
SQL_FLOAT,
SQL_FLOAT_,
SQL_DOUBLE,
SQL_DOUBLE_: NewDataType := ftFloat;
SQL_SHORT,
SQL_SHORT_,
SQL_LONG,
SQL_LONG_,
SQL_QUAD,
SQL_QUAD_,
SQL_INT64,
SQL_INT64_:
if ( SQLScale <> 0 ) then
begin
if IsCurrencyDataType then
begin
NewDataType := ftBCD;
NewDataSize := -SQLScale;
end
else
NewDataType := ftFloat;
end
else
case SQLType of
SQL_SHORT,
SQL_SHORT_: NewDataType := ftSmallint;
SQL_LONG,
SQL_LONG_: NewDataType := ftInteger;
else
{$IFDEF IBO_VCL40_OR_GREATER}
NewDataType := ftLargeInt;
{$ELSE}
NewDataType := ftFloat;
{$ENDIF}
end;
end;
SQL_TIMESTAMP,
SQL_TIMESTAMP_: NewDataType := ftDateTime;
SQL_TYPE_TIME,
...