Recent

Author Topic: SQL queries in FPSpreadSheet  (Read 6179 times)

maurobio

  • Sr. Member
  • ****
  • Posts: 294
  • Ecology is everything.
    • GitHub
Re: SQL queries in FPSpreadSheet
« Reply #15 on: August 28, 2021, 12:43:05 am »
BTW, here is code which may provide some useful ideas:

https://delphi.cjcsoft.net/viewthread.php?tid=44040

Hope it helps.

Best regards,
UCSD Pascal / Burroughs 6700 / Master Control Program
Lazarus 2.0.12 - FPC 3.2.0 on GNU/Linux Mint 19, GNU/Linux Lubuntu 18.04, Windows XP SP3, Windows 7 Professional, Windows 10 Home

wp

  • Hero Member
  • *****
  • Posts: 8877
Re: SQL queries in FPSpreadSheet
« Reply #16 on: August 28, 2021, 12:58:01 am »
I surely want to give your new component a try, but I do not see how I can help - and how the new component can help me - at this time, since you stated that filtering is not yet implement (and filtering is what I mostly need).
It was working, just forgot to refresh the dataset after activating the filter.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

maurobio

  • Sr. Member
  • ****
  • Posts: 294
  • Ecology is everything.
    • GitHub
Re: SQL queries in FPSpreadSheet
« Reply #17 on: August 29, 2021, 12:25:15 am »
@wp,

Unfortunately, I have not been able to compile the visual demo ("project2") included with your new FPSpreadsheetDataset component. I got the errors below:

Code: Pascal  [Select][+][-]
  1. fpsdataset.pas(1116,36) Error: identifier idents no member "CodePage"
  2. fpsdataset.pas(1118,27) Error: identifier idents no member "AsUTF8String"

I have not tried the other demo ("project1").

Hope you can help me to overcome these problems so that I can proceed with the tests of your component (as soon as I successfully do that, I intend to test the component with my own data).

With best wishes,
UCSD Pascal / Burroughs 6700 / Master Control Program
Lazarus 2.0.12 - FPC 3.2.0 on GNU/Linux Mint 19, GNU/Linux Lubuntu 18.04, Windows XP SP3, Windows 7 Professional, Windows 10 Home

wp

  • Hero Member
  • *****
  • Posts: 8877
Re: SQL queries in FPSpreadSheet
« Reply #18 on: August 29, 2021, 09:24:34 am »
I am developing this with the current FPC release version 3.2.2 and did not yet try to adapt the code to older versions. Your FPC 3.0.4 is too old for the current fpsdataset code. But I added a version check to the code, and now you will be able to use your FPC as well.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

maurobio

  • Sr. Member
  • ****
  • Posts: 294
  • Ecology is everything.
    • GitHub
Re: SQL queries in FPSpreadSheet
« Reply #19 on: August 29, 2021, 01:45:00 pm »
@wp,

Hi. I still got a few compilation errors when trying the latest version:

Code: Pascal  [Select][+][-]
  1. fpsdataset.pas(335,7) Error: Identifier not found "ftByte"
  2. fpsdataset.pas(335,13) Error: Constant Expression expected
  3. fpsdataset.pas(1088,13) Error: Identifier not found "ftByte"
  4. fpsdataset.pas(1088,19) Error: Constant Expression expected
  5. fpsdataset.pas(1426,9) Error: Identifier not found "ftByte"
  6. fpsdataset.pas(1426,15) Error: Constant Expression expected

However, this time I got the demo application compiled by commenting out the problematic lines. It worked quite well and the filter property behaved just as expected (I have even successfully tried some combination of conditions with "and" and "or").

If you can fix the problem above, I will proceed by testing with my own data.

With best wishes,
UCSD Pascal / Burroughs 6700 / Master Control Program
Lazarus 2.0.12 - FPC 3.2.0 on GNU/Linux Mint 19, GNU/Linux Lubuntu 18.04, Windows XP SP3, Windows 7 Professional, Windows 10 Home

maurobio

  • Sr. Member
  • ****
  • Posts: 294
  • Ecology is everything.
    • GitHub
Re: SQL queries in FPSpreadSheet
« Reply #20 on: August 30, 2021, 12:19:48 am »
@wp,

I just downloaded and tested the latest release of the component.  I have been able to compile the visual demo without any errors (just a warning about an unused variable).

I will now proceed to integrate the component in my sample application an will post the results here ASAP.

Thank you!

Best wishes,
UCSD Pascal / Burroughs 6700 / Master Control Program
Lazarus 2.0.12 - FPC 3.2.0 on GNU/Linux Mint 19, GNU/Linux Lubuntu 18.04, Windows XP SP3, Windows 7 Professional, Windows 10 Home

maurobio

  • Sr. Member
  • ****
  • Posts: 294
  • Ecology is everything.
    • GitHub
Re: SQL queries in FPSpreadSheet
« Reply #21 on: September 01, 2021, 02:36:50 pm »
Hi, @wp!

As promised, here is my sample application which successfully employs your FPSDataset component to filter a table (see the screenshots).

The application is just a demo and has many glitches but its purpose is to serve as a testbed for the component filtering capabilities.

I presume that in due time you will make available an 'official release' of the component in an installable  package.

Thank you very much!

With best wishes,
UCSD Pascal / Burroughs 6700 / Master Control Program
Lazarus 2.0.12 - FPC 3.2.0 on GNU/Linux Mint 19, GNU/Linux Lubuntu 18.04, Windows XP SP3, Windows 7 Professional, Windows 10 Home

wp

  • Hero Member
  • *****
  • Posts: 8877
Re: SQL queries in FPSpreadSheet
« Reply #22 on: September 25, 2021, 10:56:15 am »
Now that the dataset descendant for worksheets (TsWorksheetDataset) has reached some kind of stability I integrated the code in the fpspreadsheet distribution on CCR (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/). Further development will occur here, the above-mentioned version on my github will be removed sooner or later. A release for OPM is planned, as well as a wiki tutorial.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

 

TinyPortal © 2005-2018