Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix field list in Delphi < XE6 not updating after CloseOpen #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EchseKuhTiere
Copy link

Reproduced it in Delphi 7 with fibPlus 7.6 using the TpFIBDataSet component

procedure testCloseOpen();
begin
  with FibDataSet do
  begin
    Close;
    SQLs.SelectSQL.Text := 'select id, name, age from table';
    CloseOpen;
  end;
end;

procedure testOpen();
begin
  with FibDataSet do
  begin
    Close;
    SQLs.SelectSQL.Text := 'select id, name from table';
    Open;
  end;
end;

procedure main();
begin
  testCloseOpen;
  testOpen; // error: field 'age' not found
end;

I guess when 'DefaultFields' got deprecated since Delphi XE6 the propery in FIBDataSet was renamed to remove the reference.
It needs to be restored for old Delphi versions.

…precated DefaultFields property which was renamed to 'qDefaultFields' in FIBDataSet
madorin added a commit that referenced this pull request Dec 28, 2023
This feature is deprecated since XE6

It refs #58
@madorin
Copy link
Owner

madorin commented Dec 28, 2023

@EchseKuhTiere , it seems the entire property and the related GetDefaultFields function should be removed completely in latest Delphi versions.
Can you check, please, if the issue is fixed in this branch https://github.com/madorin/fibplus/compare/58-default-fields
Unfortunately, I don't have an older Delphi version installed
Many thanks,

@EchseKuhTiere
Copy link
Author

@madorin
Sorry for the late reply.
It's working but there's now another incompatibility for Delphi 7 due to this change: #73

Coming from TFIBWideStringField.GetAsString

    Result := inherited; // [Error] FIBDataSet.pas(2018): Incompatible types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants