#1 2023-01-25 08:36:42

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 272

Invalid call to TSqlDBFireDACStatement.BindArray(Param=36,Type=ftUnkno

Trying to use Firedac in a trestbatch I am getting the following error:
Invalid call to TSqlDBFireDACStatement.BindArray(Param=36,Type=ftUnknown)

The exception comes from procedure TSqlDBStatement.BindArray(Param: integer; ParamType: TSqlDBFieldType; const Values: TRawUtf8DynArray; ValuesCount: integer);
in line 5938 of mormot.db.sql  where Paramtype is ftUnknown

Looking the Orm class, this parameter is a rawutf8 and in the external mariadb database it is a Longtext field. Changing it to MediumText, the error does not exist anymore

Offline

#2 2023-01-25 20:48:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,492
Website

Re: Invalid call to TSqlDBFireDACStatement.BindArray(Param=36,Type=ftUnkno

BindArray() is not compatible with BLOB/CLOB fields by design.

Offline

#3 2023-01-25 20:51:26

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 272

Re: Invalid call to TSqlDBFireDACStatement.BindArray(Param=36,Type=ftUnkno

Ok, so probably most of them can be changed to mediumtext to work with Batches.
Thank you @ab

Offline

#4 2023-01-26 11:00:59

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 272

Re: Invalid call to TSqlDBFireDACStatement.BindArray(Param=36,Type=ftUnkno

I started with mormot2 and firedac a year ago. In the mean time I switched to zeos to have the same code base for FPC.
I did not delete the old code with firedac, I just used preprocessor conditionals to keep the firedac use.
Yesterday, I tried to use my codebase that works ok with zeos and mariadb, switching to firedac: TSqlDBFireDACConnectionProperties instead of TSQLDBZEOSConnectionProperties
The above was the first problem. Today I noticed that with firedac, mormot2 when starting, wants to add a database field from Orm that already exists as TinyInt instead of BigInt.

I just want to report that zeos and Firedac are not interchangeable under same common conditions

Offline

Board footer

Powered by FluxBB