madorin / fibplus Goto Github PK
View Code? Open in Web Editor NEWFibPlus Library for Delphi and C++Builder. Data access components for Firebird & Interbase.
FibPlus Library for Delphi and C++Builder. Data access components for Firebird & Interbase.
Does exist any example for using TpFIBSecurityService ??
The "README.md" file, say:
Installation
- Open project group or appropriate packages from
Packages
folder matching your Delphi compiler version.- Compile and install design time packages.
- Add source patch to library path in IDE for Win32/Win64 platforms.
So, open a FibPlus_Dxxxxx.groupproj file.
In Project Manager, select the dclFIBPlus_Dxxx package (design).
Right clic and select "Compile" option.
But, a error compile message apear:
[dcc32 Fatal Error] FibPlus_D26.dpk(30): E2225 Never-build package 'FibPlus_D26' must be recompiled.
Questions:
Previus, compile or build a FibPlusxxxx.dpk or not?
Next, installing a FibPlusxxx package or not?
Only Win32 appear. For design time in Win64, have a package x64?
В классе TFIBCustomDataSet вот такой страшный код:
destructor TFIBCustomDataSet.Destroy;
begin
inherited Destroy;
{$IFDEF CSMonitor}
FCSMonitorSupport.Free;
{$ENDIF}
FSourceLink.Free;
FBase.Free;
ClearBlobStreamList;
FBlobStreamList.Free;
FOpenedBlobStreams.Free;
FRelationTables.Free;
vFieldDescrList.Free;
FSQLs.Free;
FFilterParser.Free;
FFilterParser:=nil;
FRecordsCache.Free;
FRecordsCache:=nil;
FAutoUpdateOptions.Free;
FFNFields.Free;
FFNFields:=nil;
if Assigned(FKeyFieldsForBookMark) then
FKeyFieldsForBookMark.Free;
FreeAndNil(vTimerForDetail);
FreeAndNil(vScrollTimer);
FCacheModelOptions.Free;
FreeMem(vPartition);
FFilteredCacheInfo.NonVisibleRecords.Free;
end;
Предлагаю в деструкторах заменить все .Free и .Free/:= nil на FreeAndNil().
Firebird 2.5, C++ Builder 6.0.
Пытаюсь научить свою программу обрабатывать потерю соединения с БД. Для этого после старта программы делаю shutdown базы, и ловлю ошибку в TpFibErrorHandler::OnFIBErrorEvent. Но похоже, что программа вообще не доходит до вызова моей процедуры обработки. Происходит цепочка вызовов:
TpFibErrorHandler.DoOnErrorEvent -> TpFibErrorHandler.DefaultOnError -> .InternalClose -> <ошибка при закрытии транзакций> -><ошибка при закрытии запроса> -> TpFibErrorHandler.DoOnErrorEvent -> TpFibErrorHandler.DefaultOnError ... и так далее, из-за чего возникает переполнение стека.
In during compile process of IBPlusEditors2007.dpk, errors appear, because the .dpk file contains links to missing (and unnecessary) files, for examle - {$R 'UnitSyntaxMemo.dcr'}
In addition, the file FIBPlusEditors2007.dproj has links to files in a non-existent directory, for example:
DCCReference Include="RegFIBPlusEditors.pas"
instead of
DCCReference Include="..\Editors\RegFIBPlusEditors.pas"
and so on.
Both files are fixed and attached to this issue: PackagesD2007.zip
Replace them in the project, please.
Regards - Malinovsky Vladimir.
According to http://www.sql.ru/forum/1119183/strannost
TIBClientLibrary.FreeIBLibrary have to contain
fb_shutdown call
Hello,
Unit pFibMetada.pas contains wrong relation name at line 930 (RDB$RELATIONS instead of RDB$PACKAGES):
After installation it is as follows:
QRY_PACKAGE_SUPPORTS=
' SELECT 1 FROM RDB$RELATIONS RF WHERE RF.RDB$RELATION_NAME = ''RDB$RELATIONS''';
correct const SQL should be:
' SELECT 1 FROM RDB$RELATIONS RF WHERE RF.RDB$RELATION_NAME = ''RDB$PACKAGES''';
Tried to connect to a Firebird 2.5 server.
I experienced that the above issue breaks code completion in SQL editor and also TpFIBDBSchemaExtract.GetDDLText;
With Firebird 3 and above there may be no problems.
Thank you.
Best regards,
Tomca
Hello,
I could not find FB2InsertReturning example as indicated on PDF manuals found online. Is it possible to add one example as I could not figure how to do that.
Thanks & regards,
Ertan
Написал фильтр для датасета:
filter := 'ID in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)';
При включении фильтра получаю ошибку:
Variant or safearray index out of bounds
в модуле FIBDataset
procedure TFIBCustomDataSet.RefreshClientFields(ForceCalc:boolean=True);
...
b:=Bookmark;
try
Bookmark:=b; //здесь выдает ошибку
Но если в скобках оставить только 16 чисел:
filter := 'ID in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)';
Delphi 10.1 Berlin
FibPlus 7.6 http://www.sql.ru/forum/955845-12/a-chto-proekt-devrace-fibplus-uzhe-umer
Есть такой код
function TFIBBCDField.GetAsVariant: Variant;
...
if Size=4 then
Result :=AsCurrency
else
Result :=AsExtended;
Если точность поля например 18,2, то теряем точность,
Решение
if Size<=4 then
Hello all,
What is the correct parameter to activate and use the WireCompression in FibPlus? In the server I edit the option to "WireCompression = true" but I can't find the correct parameter to set when connecting to the database.
Thanks
Reformat the source code by built-in code formatter
Доброго времени суток! При использовании данной процедуры, например, удалении записей, если запись в наборе не находит, безусловно подставляет пустую запись в кеш датасета. Возможно ли добавить что-то вроде " if not IsDeletedRecords then ..." как это происходит в RefreshFromDataSet?!
Приветствую!
Перед открытием данных в TpFibDataset создаем калькулируемые поля через CreateCalcField. Но после открытия датасета обнаруживаем, что в нем нет никаких полей, кроме созданных калькулируемых. Обнаруживаем также, что вообще все создаваемые нами объекты TpFibDataset имеют DefaultFields значение false, отсюда в CreateCalcFields не срабатывает код:
if DefaultFields then Include(FRunState,drsForceCreateCalcFields);
из-за этого в открываемом датасете в TFIBCustomDataSet.InternalOpen не срабатывает
if drsForceCreateCalcFields in FRunState then
Exclude(FRunState,drsForceCreateCalcFields);
CreateFields;
SetDefaultFields(True);
....
если же в TFibCustomDataset
исправить
property qDefaultFields:boolean read GetDefaultFields ;
на исходное
property DefaultFields:boolean read GetDefaultFields ;
то конкретно ЭТА проблема решится. Но не зря ж там это "q" поставили.... Проблема!
Приветствую!
Свойство TFIBDatabase.AttachmentID не проинициализируется заново, если случился разрыв коннекта у базы данных, и мы заново его восстанавливаем (ведь TFibDatabase.close не выполнился, а инициализация vAttachmentID происходит либо в Create, либо в Close). Исправится, если в TFibDatabase.Open перед обращением к свойству AttachmentID вставить инициализацию переменной vAttachmentID:
...
vInternalTransaction.Timeout :=1000;
FStreammedConnectFail:=False;
vAttachmentID :=-1; //<--- here
AttachmentID;
DPB:=FDPB;
...
One of the last official versions was FIBPlus 6.9.9 , for RAD Studio 2009-2010
In this project, for example, the file "FIBConsts.pas" is incomplete, because in 2009 constants were added for the strings that appear in the Editors and Tools.
Therefore, the "Tools" folder containing the wizards is also missing in this project (the following file is also missing FIBPlusToolsDxxxx.dpk)
Note: I can contribute these files to the project if you wish.
If i set on field OnValidate, the value becomes empty. This problem appears on any type of field
procedure TpFIBDatabase.RestoreConnect(Sender:TObject);
var
Actions:TOnLostConnectActions;
vIsTimer:boolean;
begin
if Connected then
begin
StopWaitRestoreConnect; // Без этой процедуры vTimer никогда не остановится
Exit;
end;
...
Исправление в строке 721.
Если передать на вход строку ' ', то процедура уйдет в отрицательные индексы по строке
715:procedure TrimPositions(const Str:string; var Left,Right:integer);
716:begin
717: Right:=Length(Str);
718: if Right>0 then
719: begin
720: Left :=1;
721: while (Right > 0) and (Str[Right] <= ' ') do Dec(Right);
722: while (Left <= Right) and (Str[Left] <= ' ') do Inc(Left);
723: end
724: else
725: Left:=0;
726:end;
Les consulto, tengo 2 pc, en una funciona todo bien y en la otra puedo compilar bien, pero cuando ejecuto el sistema me da un error: Project xxx.exe raised exception class EOSError with message 'System Error. Code 126. No se puede encontrar el modulo especificado'
Creo que algo tiene que ver con la gds32.dll y fbclient.dll, si alguien me da una mano se lo agradecería.
Uso firebird 2.5 como motor.
I have run some tests on Firebird 4, and it works well.
The main problem I ran into, is this error:
Unknown SQL Data type (32752)
It happens if I do something like:
select sum(MyNum) from MyTable
MyNum is a decimal(18,5)
Firebird is converting it to the new decfloat type, which FIBPlus does not recognise.
It is fantastic, as large calculations that used to cause overflow error don't any more.
It can be avoided by adding a cast() or using the compatibility features, but it would be nice if the new data types were added to FIBPlus.
The other place I had a Unknown SQL Data type (3275x) error was:
select * from mon$attachments
That was due to the new datetime with local portion. Got around it by casting to a regular timestamp, or invoking the use of legacy types.
Why dont update pFIBVersion.inc?
Today, begin updated to D11 in 2021, so...
Now is:
FIBPlusVersion:integer = 7;
FIBPlusBuild:integer = 632;
FIBPlusBuildDate = '17.02.2014';
FIBCustomBuild:integer = 3171;
To this:
FIBPlusVersion:integer = 7;
FIBPlusBuild:integer = 2021;
FIBPlusBuildDate = '31.12.2021';
FIBCustomBuild:integer = 1231;
Or, if dont change original Build, then set info on CustomBuild section, like this:
FIBPlusVersion:integer = 7;
FIBPlusBuild:integer = 632;
FIBPlusBuildDate = '31.12.2021';
FIBCustomBuild:integer = 2021;
On Firebird 2.5, calling:
pFIBDBSchemaExtract.LoadMetaData(false);
Results in this error:
Column does not belong to referenced table.
SQL error state =42S22
Dynamic SQL Error.
SQL error code = -206.
Column unknown.
RDB$PACKAGE_NAME.
At line 2, column 26.
The problem is with the detection of the availability of the new FB3 packages feature.
This line of code:
QRY_PACKAGE_SUPPORTS=
' SELECT 1 FROM RDB$RELATIONS RF WHERE RF.RDB$RELATION_NAME = ''RDB$RELATIONS''';
Needs to change to:
QRY_PACKAGE_SUPPORTS=
' SELECT 1 FROM RDB$RELATIONS RF WHERE RF.RDB$RELATION_NAME = ''RDB$PACKAGES''';
I did create my own branch, but Git won't let me submit a pull request, says project is archived or I don't have permission.
Код:
fquery.sql.clear;
fquery.sql.add('select id from table');
fquery.execquery;
повторяем:
fquery.sql.clear;
fquery.sql.add('select id from table'); <<< вызывается эксцепшен о том что соединение открыто.
Лечится убиранием в FIBQuery новой опции FreeHandleAfterExecute и всего что с ней связано.
Возможно это всё так и задумывалось, но в таком случае ломается весь старый код, что неприемлемо.
Окружение:
Delphi 10.2 Update 3 Tokyo Architect
Firebird 3.0.3.32900
В Firebird 3 появился тип данных boolean
Не смог добиться передачи boolean-параметра в Firebird
Передаю из Delphi:
FIBDataSet.ParamByName('PARAM_NAME').AsBoolean := true;
но в Firebird уходит числовое значение 1
Пост на sql.ru: http://www.sql.ru/forum/1295664/fibplus-ne-umeet-peredavat-boolean-parametry
Мой email: [email protected]
Using Delphi Seattle (win32) + FIBPlus 7.7.7000 Release connects to FirebirdSQL 2.5, every input and update on field oy type BIGINT using dbgrid gives weird result.
It always changes my input to integer 32.
I can give test code and database if required.
Hi,
Why, after installing the components in Delphi 10.3, i don't see in the list of components, the tpFibClientDataSet component ?
thank you for advance :-)
Hi, I'm compiling Fibplus with new D11.1 Alexandria. An application compiled as win64 raises always an access violation when processing TFIBCustomDataSet.DataEvent. The problem is due to a couple of calls to that method with a brutal cast of the Field variable as longint instead of EventInfo (that is NativeInt).
I correct with the right cast the 2 methods TFIBCustomDataSet.SetFieldData and TFIBDSBlobStream.Destroy and the access violation is gone.
Hi madorin/fantocci :)
When I try to build package then I get next message
[DCC Error] pFIBDBEdit.pas(41): E2004 Identifier redeclared: 'Dialogs'
[DCC Error] pFIBDBEdit.pas(41): E2004 Identifier redeclared: 'Controls'
[DCC Error] pFIBDBEdit.pas(120): F2063 Could not compile used unit '..\Editors\RTTIRoutines.pas'
What am I doing wrong?
I enclose an archive with a set of examples. Please add it to the library.
Sincerely, Vladimir Malinovsky.
I'm using delphi 7, i compiled FibPlus package fine, but FibPlusEditor not, because there is not RegFIBPlusUtils.pas, this file is required
если у TpFIBQuery задать следующие параметры
GoToFirstRecordOnExecute = True;
qoStartTransaction = true
qoAutoCommit = true
то при выборке select
происходит закрытие транзакции после первого фетча, что приводит к ошибке выполнения
смотрим код в версия 7.6 код
if FGoToFirstRecordOnExecute
then begin
DoAfterExecute(Assigned(FMDTMainDataOrder), vAfterExecEvent);
vAfterExecEvent := False;
Next;
end;
в версии 7.5 код был такой
if FGoToFirstRecordOnExecute then
Next;
думаю DoAfterExecute
лишний в версии 7.6 этот код выполнится позже
В большинстве пакетов FIBPlusEditors*.dpk (например, в FIBPlusEditors2007.dpk) есть строки
{$R 'UnitSyntaxMemo.dcr'}
и
UnitSyntaxMemo
in '..\Editors\UnitSyntaxMemo.pas',
В то же время, модуль ..\Editors\UnitSyntaxMemo.pas отсутствует. Как я понял, модуль был заменен на pFIBSyntaxMemo.pas.
Надо бы поправить соответствующие *.dpk's.
TpFIBQuery.RowsAffected gives 0 even if the records deleted is non zero
I see ibase.pas has frb_info_creation_date = 111, but it is not used anywhere.
I am unable to access the protected method TFIBDatabase.GetForcedWrites: Long; in order to read the date the Firebird database file was created.
It would be great if TFIBDatabase had a property for accessing the date the file was created.
при попытке установить в РадСтудио2010 появляются ошыбки
Hi,
Can someone research why array fields don't work in recent fib? I didn't. :(
For information, I'm sending an old FIB for D2007 that works. And a demo program.
Допустим есть такой запрос:
select
ID,
Y,
M
from T
where
Y = :Y
По-умолчанию фибы сделают такой RefreshSQL:
select
ID,
Y,
M
from T
where
Y = :Y
and ID = :old_ID
При выполнении DataSet.Refresh вызывается процедура в TFIBCustomDataSet.SetQueryParams с параметром Qry = QRefresh.
Так вот код этой процедуры вместо значений параметров из DataSet подставляет значения одноименные полей из DataSet. Это логично для QInsert, QUpdate, QDelete, но вот для QRefresh кажется неправильным. Ведь для того, чтобы взять значений поля, можно руками прописать префикс "old_" перед параметром.
Что еще интересно, так конструкция if в этой процедуре (модуль FIBDataSet.pas, строка 6145)
if(Qry=FQRefresh) and (DataSource<>nil) then
Получается, что для детального датасета (в связке мастер-деталь) значения параметров возьмутся из самих параметров, а для любого другого датасета - из полей (если такие есть).
Может я неправильно понимаю этот код или не вижу всей картины, но может быть проверку (DataSource<>nil) нужно убрать?
This doesn't work:
pFIBDataSet1.InsertRecord([1, 1]);
(Nothing happened. No database insert. No any errors)
This works:
pFIBDataSet1.Insert;
pFIBDataSet1.SetFields([1, 1]);
pFIBDataSet1.Post;
(I've attached test with source code and compiled executible. Database FB ver 3. fdb and fbk files and DDL as well.)
As new feature FB 3.0 that execute block can declare sub-routine/function.
But TpFIBScripter fail to parse.
TpFIBQuery or TpFIBDataset success to execute.
There's a default integer value in database. (TFIBIntegerField)
When inserted a new row into database, the field's validate method occurs, and in this validate method, the default value is not the same as set in database.
TFIBStringField doesn't have this issue, just the TFIBIntegerField.
I'm runnning XE10. It was working on XE2.
Thanks!
Hello, everyone.
I have the following question:
In case TpFIBClientBCDField.IsNull=True TpFIBClientBCDField.Value returns 0, not null. In TBCDField the same function returns null. Is it a bug or a feature?
Hi!
Does anyone knows if it's possible to connect to a database encrypted with IBSurgeon's "Firebird Encryption Plugin Framework" using fibplus?
I connected using KeyHolder.conf on plugins folder, however this is not the production way. This is not really safe...
Thank you in advance.
Sergey Buzadzhy's decision of this bug (Ticket # 13052)
http://www.devrace.com/en/support/tickets/index.php?login=yes&ID=13052
In Unit FIBDataSet
change method TFIBDataLink.CheckBrowseMode
to
procedure TFIBDataLink.CheckBrowseMode;
begin
end;
В FIBDataSet.pas при удалении MDT была утеряна строка
8431: else
----: if CacheModelOptions.CacheModelKind = cmkLimitedBufferSize then
8432: begin
8433: Pos := 1;
8434: while Pos <= Length(FAutoUpdateOptions.KeyFields) do
8435: begin
8436: tf:= FN(ExtractFieldName(FAutoUpdateOptions.KeyFields, Pos));
8437: if Assigned(tf) then
I have some question for FIBPlus maintenance code:
regards
delphifocus
TpFIBDataSet.TFIBxxxField.OnValidate will create an Access Violation error
when reading the same field as the OnValidate "sits" on.
OnValidate on a TStringField in a TpFIBDataSet works.
Delphi Tokyo (10.2.3)
Improve the package compiler direktives for the FIBPlus Runtime-package with the directive
{$RUNONLY ON}
see: http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/compdirsrunonlydirective_xml.html
Reason is that the DelphiPI checks the directive for 64bit compiling: https://bitbucket.org/idursun/delphipi/src/master/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.