Using Firedac with Services will crash the application. I moved to dbExpress and now using TSQLConnection plus TSQLQuery. I am updating a simple table and it works but raises an exception: "feature not implemented". Tips?

Comments

  1. Did you do CoInitialize for all threads, including main thread? You don't want to use db express. That shit is ancient. I'm using FireDAC with MS SQL and NSQLCLI in services. No crashes except those I cause myself.

    ReplyDelete
  2. Lars Fosdal I'm using dbExpress only because FireDAC crashed with my Service.. I will try it again

    ReplyDelete
  3. Is this on Android? If using FireDAC, and you have a TFDGUIxWaitCursor component, change the Provider property to Console, and (regardless) remove any units from the FMX namespace in any of your uses clauses.

    ReplyDelete
  4. Magno Lima I also make a point of creating, using and destroying db objects in the same thread.

    ReplyDelete
  5. David Nottage I will do that, change to Console, but after save it put FMX units anyway! Lars Fosdal I put the compos directly into the datamodule, gonna try to remove them and creating in runtime...

    ReplyDelete
  6. Magno Lima You may need to also change the ClassGroup property of the datamodule to System.Classes.TPersistent, then remove the FMX units again

    ReplyDelete
  7. It is working now!!! Using FireDAC with Services. Wow, thank you guys. By the way, it was not needed to create the components in runtime, at least the Connection and WaitCursor.

    ReplyDelete
  8. Magno Lima So, what was the necessary change? What caused the initial problem?

    ReplyDelete
  9. Lars Fosdal Removed the FMX related units, changed the ClassGroup property of the DataModule to TPersistent, set the WaitCursor property Provider to Console, as David told. Also, I need to clean and rebuild all.

    ReplyDelete
  10. Magno Lima Thank you for sharing.

    ReplyDelete

Post a Comment