Additional
AnyDAC vs Qt
Posted by Support [Dec 13, 2010]
Is not that comparision sounds a bit strange ? Probably ... But from time to time I am reading the phrases like "Qt is great for cross-platform development. Why not use Qt for multi platform desktop application development, that will work with database ?!"

So, I decided to install and check this great Nokia product. At first I read the site content and payd attention to:

 

Qt description

Then I downloaded and install Qt. And started to analyze the data access driver sources, keeping in mind the AnyDAC for Delphi features. They are located in (Qt)\qt\src\sql\drivers\ folder. I analyzed the Firebird (ibase) and PostgreSQL (psql) sources and stoped after that. Dont want to be pessimistic, but ...

Firebird

  • Qt supports only static Firebird client linking. But sometimes mixing of Firebird server and client (fbclient.dll) versions may lead to hard to fix issues. And you have to explicitly choose FB client version you will use, because the code has a lot of:

#if defined(FB_API_VER) && FB_API_VER >= 20 

  • Qt driver supports only single transaction per connection. And does not allow to specify the transaction parameters for the isc_start_transaction call. With "set transaction" statement you will be really limited.
  • "Retaining" transaction finishing mode is not supported by Qt.
  • Firebird events are supported by Qt, but only single event per connection is possible.
  • At connection establishment time Qt is limiting connection parameters to user_name, password, lc_type, role_name. So, for example, it is not possible to specify SQL dialect.
  • In Qt application is not possible to execute CREATE DATABASE statement.
  • Qt has no ability to cancel long running queries.
  • To call a stored procedure from a Qt application, you have to write EXECUTE PROCEDURE by hands. And do not forget the parameter definitions and order.
  • The Qt set of supported metadata is very small. For example, there is no SP list and SP parameter list.
  • Qt does not offer access to the Firebird services.
  • and so on ...

PostgreSQL

  • PostgreSQL has the domain type system. And each domain has its own data type ID. Qt is not aware of that, and only limited set of build-in data types is supported.
  • Qt does not support Large Objects.
  • Qt does not support PostgreSQL composite data types - neither records, neither arrays.
  • No support for cursors at al in Qt.
  • No rowset fetching in Qt. Sure, because cursors are not supported.
  • Again, to call a stored procedure from a Qt application, you have to write SQL by hands.
  • Again, the set of Qt supported metadata is very small.
  • Again, Qt has no ability to cancel long running queries.
  • Again, PostgreSQL notifications are supported by Qt, but only single notification per connection is possible.
  • and so on ...

Conclusion

Practically that means that using Qt it will be hard to develop a full-scale desktop application working with a database. But it is OK to write a phone book application or a code storing settings in a database.

 

So, if you going to choose cross platform desktop application development tool, that will work with a database extensively, and considering to switch to Qt, be careful. And always pay attention to words written on the sites (read the words in red circle) ! Cool 

How to be ?

AnyDAC does not have the above issues and supports these and many other DBMS features. Together with Lazarus and FreePascal compiler you are getting great and feature reach cross platform and cross DBMS development tool. With release of the cross-platform Delphi in 2011, you will get even better tool for that !


LIST OF COMMENTS


1/2. Haha ...
Posted by Michael Thuma - Dec 13, 2010
Website
Take the opportunity and write an AnyDAC for QT. Maybe crossplattform apps are not database centric and the world today is no longer seeking for cross plattform desktop based business apps, maybe never did. What about this!

2/2. Good news anyway
Posted by Michael Thuma - Dec 13, 2010
Website
Good to hear that FPC/Lazarus can now be considered. At least more than some some tests here starting by the middle of the year has shown that it worked already. I have used Oracle Instant Client. AnyDAC did it's job together with FPC/Lazarus  Cannot say more about another DB except Firebird that also rocked running under LInux from Delphi as well as FPC via AnyDAC.

Add Comments