Giter Club home page Giter Club logo

fibplus's People

Contributors

boberoo avatar dennislarsen avatar did-vmonroig avatar dshumko avatar madorin avatar oberon82 avatar wadealer avatar wiphi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fibplus's Issues

Jason dinAlt

Does exist any example for using TpFIBSecurityService ??

Installation

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().

Stack Overflow on database shutdown

Firebird 2.5, C++ Builder 6.0.
Пытаюсь научить свою программу обрабатывать потерю соединения с БД. Для этого после старта программы делаю shutdown базы, и ловлю ошибку в TpFibErrorHandler::OnFIBErrorEvent. Но похоже, что программа вообще не доходит до вызова моей процедуры обработки. Происходит цепочка вызовов:
TpFibErrorHandler.DoOnErrorEvent -> TpFibErrorHandler.DefaultOnError -> .InternalClose -> <ошибка при закрытии транзакций> -><ошибка при закрытии запроса> -> TpFibErrorHandler.DoOnErrorEvent -> TpFibErrorHandler.DefaultOnError ... и так далее, из-за чего возникает переполнение стека.

Errors during the compile process FIBPlusEditors2007.dpk.

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.

const QRY_PACKAGE_SUPPORTS contains wrong RELATION_NAME

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;

pFIBMetaData.zip

With Firebird 3 and above there may be no problems.

Thank you.

Best regards,
Tomca

FB2InsertReturning example

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

FIBDataset - при включении фильтра выдает ошибку

Написал фильтр для датасета:
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

Проблема с TFIBBCDField.GetAsVariant для D5

Есть такой код
function TFIBBCDField.GetAsVariant: Variant;
...
if Size=4 then
Result :=AsCurrency
else
Result :=AsExtended;

Если точность поля например 18,2, то теряем точность,
Решение
if Size<=4 then

How to activate compression?

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

TpFIBDataSet.RefreshFromQuery подставляет лишние записи в датасет

Доброго времени суток! При использовании данной процедуры, например, удалении записей, если запись в наборе не находит, безусловно подставляет пустую запись в кеш датасета. Возможно ли добавить что-то вроде " if not IsDeletedRecords then ..." как это происходит в RefreshFromDataSet?!

Не работает CreateCalcFields

Приветствую!
Перед открытием данных в 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.AttachmentID не проинициализируется заново, если случился разрыв коннекта у базы данных, и мы заново его восстанавливаем (ведь TFibDatabase.close не выполнился, а инициализация vAttachmentID происходит либо в Create, либо в Close). Исправится, если в TFibDatabase.Open перед обращением к свойству AttachmentID вставить инициализацию переменной vAttachmentID:

  ...
  vInternalTransaction.Timeout      :=1000;  
  FStreammedConnectFail:=False;
  vAttachmentID    :=-1; //<--- here
  AttachmentID;
  DPB:=FDPB;
  ...

Incomplete

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.

validation

If i set on field OnValidate, the value becomes empty. This problem appears on any type of field

pFIBDatabase.pas

procedure TpFIBDatabase.RestoreConnect(Sender:TObject);
var
Actions:TOnLostConnectActions;
vIsTimer:boolean;
begin
if Connected then
begin
StopWaitRestoreConnect; // Без этой процедуры vTimer никогда не остановится
Exit;
end;
...

Out of memory, StrUtil

Исправление в строке 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;

Problemas en ejecucion

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.

Support for new Firebird 4 data types

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.

About version

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;

Firebird 2 and before detecting Firebird 3 packages allowed when it shouldn't

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.

Лишняя проверка на открытое соединение в FIBQuery

Код:
fquery.sql.clear;
fquery.sql.add('select id from table');
fquery.execquery;
повторяем:
fquery.sql.clear;
fquery.sql.add('select id from table'); <<< вызывается эксцепшен о том что соединение открыто.

Лечится убиранием в FIBQuery новой опции FreeHandleAfterExecute и всего что с ней связано.
Возможно это всё так и задумывалось, но в таком случае ломается весь старый код, что неприемлемо.

FibPlus не умеет передавать boolean-параметры

Окружение:
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]

Bug on bigint field

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.

Component tpFibClientDataset

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 :-)

Access violation in TFIBCustomDataSet.DataEvent on 64bit application with Delphi 11.1

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.

Can't install FIBPlusEditors2007.dproj

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?

TpFIBQuery. закрытие транзакции после первого фетча

если у 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 этот код выполнится позже

В дизайтайм-пакете FIBPlusEditors2007.dpk (и т.п.) ссылка на отсутствующий UnitSyntaxMemo.

В большинстве пакетов FIBPlusEditors*.dpk (например, в FIBPlusEditors2007.dpk) есть строки

{$R 'UnitSyntaxMemo.dcr'}

и

UnitSyntaxMemo in '..\Editors\UnitSyntaxMemo.pas',

В то же время, модуль ..\Editors\UnitSyntaxMemo.pas отсутствует. Как я понял, модуль был заменен на pFIBSyntaxMemo.pas.

Надо бы поправить соответствующие *.dpk's.

Getting the file creation date

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 появляются ошыбки

Params in RefreshSQL

Допустим есть такой запрос:

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) нужно убрать?

FIBDataSet.InsertRecord() doesn't work

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;

Test_InsertRecord.zip

(I've attached test with source code and compiled executible. Database FB ver 3. fdb and fbk files and DDL as well.)

Database integer default value problem

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!

Firebird Encryption

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.

FIBDataSet.pas, утеряна строка

В 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

FIBPlus Development

I have some question for FIBPlus maintenance code:

  1. Can we use this public FIBPlus for commercial project development?
  2. Can you also add the Tools source code within this github code?
  3. Why not update/increase the pFIBVersion.inc after every modification (fix/updating code)?
  4. Please update the changeslog.txt with every modification.
    Thanks a lot.

regards
delphifocus

TFIBxxxfield.OnValidate might dump

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)

TestOnValidate.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.