Comments (6)
With this change it works for me.
function TFIBXSQLVAR.GetAsBoolean: boolean;
begin
Result := False;
if not IsNull then
case FXSQLVAR^.sqltype and (not 1) of
SQL_BOOLEAN,SQL_SHORT:
Result := PShort(FXSQLVAR^.sqldata)^=ISC_TRUE;
FB3_SQL_BOOLEAN: // BS 25.03.2019
Result := PByte(FXSQLVAR^.sqldata)^=ISC_TRUE;
SQL_LONG:
Result := PLong(FXSQLVAR^.sqldata)^=ISC_TRUE;
SQL_INT64:
Result := PInt64(FXSQLVAR^.sqldata)^=ISC_TRUE;
else
FIBError(feInvalidDataConversion, [nil])
end;
end;
from fibplus.
Аналогичное поведение, ФИБ последний отсюда, Delphi XE2, FireBird 4. При выполнении запроса через TpFIBQuery.ExecWP(const ParamValues: array of Variant) с BOOLEAN в параметрах вылазит ошибка:
Project ... raised exception class EFIBInterBaseError with message 'Incompatible column/host variable data type.
SQL error state =22018
Dynamic SQL Error.
SQL error code = -303.
Conversion error from string "0".
Как поправить?
from fibplus.
В общем, разобрался, маленькая поправка снимает проблему.
Модуль: FIBQuery.pas
Метод: procedure TFIBXSQLVAR.SetAsVariant(Value: Variant);
кусок
varBoolean:
if Value then
AsVariant := VariantTrue
else
AsVariant := VariantFalse;
заменить на:
varBoolean:
case sSQLType of
FB3_SQL_BOOLEAN: AsBoolean := Value;
else if Value then
AsVariant := VariantTrue else
AsVariant := VariantFalse;
end;
from fibplus.
Еще одна поправочка в том же модуле:
function TFIBXSQLVAR.GetAsBoolean: boolean; begin Result := False; if not IsNull then case FXSQLVAR^.sqltype and (not 1) of SQL_BOOLEAN,SQL_SHORT: Result := PShort(FXSQLVAR^.sqldata)^=ISC_TRUE; SQL_LONG: Result := PLong(FXSQLVAR^.sqldata)^=ISC_TRUE; SQL_INT64: Result := PInt64(FXSQLVAR^.sqldata)^=ISC_TRUE; FB3_SQL_BOOLEAN: Result := PBoolean(FXSQLVAR^.sqldata)^ = True; else FIBError(feInvalidDataConversion, [nil]) end; end;
from fibplus.
В редакторе норм показывает, тут чет все в кучу слепил. В общем, думаю, там понятно будет.
from fibplus.
Тут, похоже, тоже забросили бедные фибы...
from fibplus.
Related Issues (20)
- const QRY_PACKAGE_SUPPORTS contains wrong RELATION_NAME HOT 1
- Bug on bigint field
- FIBDataSet.pas, утеряна строка HOT 1
- How to activate compression? HOT 1
- Out of memory, StrUtil HOT 4
- Component tpFibClientDataset
- Support for new Firebird 4 data types
- validation HOT 5
- TpFIBDataSet.RefreshFromQuery подставляет лишние записи в датасет
- Access violation in TFIBCustomDataSet.DataEvent on 64bit application with Delphi 11.1 HOT 2
- About version
- Installation
- Incomplete
- FIB Editor not displaying correctly HOT 2
- В дизайтайм-пакете FIBPlusEditors2007.dpk (и т.п.) ссылка на отсутствующий UnitSyntaxMemo.
- TpFIBClientBCDField.GetAsVariant in case IsNull is true
- Can't install FIBPlusEditors2007.dproj
- Can't find by name lookup field with type TFIBWideStringField HOT 1
- cacheSchema slows down user experience when firebird is over internet
- Problem with fibplus installation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fibplus.