Jump to content

Zoran Bonuš

Members
  • Content Count

    25
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Zoran Bonuš


  1. 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.

     


  2. Yes, official installer is the safest method for client-only install.

    It is also well documented in the FB3 Quick Start Guide, chapter 3.5, and in /doc/ folder in the installation path (e.g. "c:\Program Files\Firebird\Firebird_3_0\doc")

    For manual installation, copying fbclient.dll / gds32.dll + msvcp100.dll  + msvcr100.dll  +  firebird.msg works fine too.

     

    I just want to add that there is also a handy community-mantained chocolatey.org package

    - can silently install (and upgrade) server or client-only

    choco install firebird /ClientOnly

    (you need to install chocolatey first, of course).

     


  3. Just now, Markus Kinzler said:

    How are the settings fpr the transcation?

     

    Maybe the use of an sequence and

    
    NEXT VALUE FOR

    or

    
    GEN_ID()

      could be an option.

    Exactly, just what I was about to recommend. You create deadlock because the new value of VIEW_COUNT depends on the old value, and due to the nature of multi-generation architecture a simultaneous transactions, there can be different old values, depending on the isolation settings of your transaction.

    Using generator/sequence for view_count circumvalents the problem for this specific update query. However, a proper transaction setting is preferred anyway. There is no magic solve-it-all setting, I recommend studing the docs too .. will most likely came in handy later anyway.

    • Like 1

  4. Just a heads up: if you you are using IBX (IBExpress) library. There is a annoying regression in current 10.3.3 release.

    Already reported here: https://quality.embarcadero.com/browse/RSP-26997

     

    When you use IBStoredProcedure + prepare/refresh string input params (in design/IDE or at runtime), you get an exception or silent corruption.

     

    I have just learnt about it today, crashing our system in production.

    Patch is available in the bug report.

×