Jump to content

Zoran Bonuš

Members
  • Content Count

    34
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Zoran Bonuš


  1. Setting SQL forces the FDQuery to close. My guess is that in combination with pooled connection, it might release the connection too. Have you tried setting the SQL before starting the transaction or even setting the FDQuery.Connection ?

     

    You might try to debug and trace into the line where you set the SQL to see what after-effects it has in your context.

    • Thanks 1

  2. 1 hour ago, Lainkes said:

    I'm using MariaDB.

    I have 1 table. In that table are 50 fields (string) that can be True or False.

    I want a count of the True value for every field for a particular year.

    I thought that SUM was adding values, not counting. Am I correct?


    Thanks for your feedback

     

    Lainkes

     

    Right, but you can convert boolean to integer (1/0) and then SUM works like COUNTIF. Conversion can be implicit or explicit, or using case/iif constructs... whatever MariaDB supports.

     

×