Recent

Author Topic: Announcing a Dynamic Database Controls Package  (Read 3342 times)

tonyw

  • Sr. Member
  • ****
  • Posts: 344
    • MWA Software
Announcing a Dynamic Database Controls Package
« on: January 01, 2025, 02:07:22 pm »
This set of Dynamic Data Controls were originally distributed as an integral part of the
IBX for Lazarus package and were dependent on the use of IBX for database access.
They can now be used independently from IBX.

Starting with IBX release 2.7.0, the “ibcontrols” package was no longer dependent on the rest of
IBX. Pascal (corba) interfaces are used to communicate between the controls and the
database access provider (e.g. IBX) and any similar package that provides the same
interfaces can now be used with the controls. Developers of other Database Access
Providers are encouraged to use these interfaces as defined in the code snippet
IBDynamicInterfaces.inc and to provide the same functionality in their packages, and
hence to allow their use with the Dynamic Database Controls.

The Lazarus IDE pallet tab for these controls has also been renamed from “Firebird Data Controls”
to “Dynamic Database Controls”. The package name remains “ibcontrols”.

The Dynamic Database Controls are:
    • TDBControlGrid           (Similar to Delphi's TDBCtrlGrid and works with any Database Driver)
    • TIBDynamicGrid           (Other than dynamic row sorting works with any Database Driver)
    • TIBLookupComboEditBox    (Requires IBX or IBDynamicInterfaces support)
    • TIBTreeview              (Requires IBX or IBDynamicInterfaces support)
    • TIBArrayGrid             (Requires IBX or IBDynamicInterfaces support
                                        and is specific to Firebird arrays)

For full information on the dynamic database controls and IBDynamicData interface see
the user guide in the doc directory.

This package can be downloaded from GitHub (https://github.com/MWASoftware/ibcontrols)

egsuh

  • Hero Member
  • *****
  • Posts: 1696
Re: Announcing a Dynamic Database Controls Package
« Reply #1 on: January 02, 2025, 08:14:03 am »
Hello, Happy New Year, and good news from the start of 2025.

Does this mean that we can use Dynamic Database Controls with Lazarus's own database components like TIBConnection and TDataSource?

cdbc

  • Hero Member
  • *****
  • Posts: 2476
    • http://www.cdbc.dk
Re: Announcing a Dynamic Database Controls Package
« Reply #2 on: January 02, 2025, 09:30:46 am »
Hi
I would think Yes, as long as the components implement the interfaces required... You might have to write small wrapper-classes that does the implementation for the components, but hey, that's easy peasy  ;D
It's a great & cool new feature, Me Likey  8-)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6 -> FPC 3.2.2 -> Lazarus 4.0 up until Jan 2025 from then on it's both above &: KDE6/QT6 -> FPC 3.3.1 -> Lazarus 4.99

tonyw

  • Sr. Member
  • ****
  • Posts: 344
    • MWA Software
Re: Announcing a Dynamic Database Controls Package
« Reply #3 on: January 02, 2025, 10:28:11 am »
Hello, Happy New Year, and good news from the start of 2025.

Does this mean that we can use Dynamic Database Controls with Lazarus's own database components like TIBConnection and TDataSource?

Yes. They are now independent of IBX. The control grid never did have any IBX dependencies and that can now be fully used in any project. The Dynamic version of TDBGrid can be now used with any database driver (e.g. SQLite) - automatic expansion of columns to fit the grid, rows that open up as panels, etc. The exception is that unless the underlying database driver provides the IDynamicSQLDataset interface and the dcChangeDatasetOrder capability, you will not be able to resort the gird simply by clicking on the header of the column to sort on. At present, you only get that with IBX - hopefully other devs will pick this up and add the interface support to their database drivers.

The LookupComboBox provides autocompletion and lookup of similar items. However, without IDynamicSQLDataset support and the dcUpdateWhereClause capability, it doesn't really offer any benefits on top of a standard lookup box, and TDBTreeView isn't worth looking at when IDynamicSQLDataset is not supported as it works by repetitive DB queries in order to read the tree.

 

TinyPortal © 2005-2018