You are not logged in.
Pages: 1
Is there a maximum number of parameters that can be passed to a query when using Firedac?
I am able to perform a big insert on Mysql when connected with TodbcConnectionProperties without issues, but when using Firedac (libmysql.dll), I get the following error:
{
"errorCode":500,
"error":
{"ESQLDBException":{
"ClassName":"ESQLDBException",
"Address":"a8fef1 SynDB.ReplaceParamsByNames (8038) ",
"Message": "Parameters :AA to :ZZ"
}}
}
It is raised by ReplaceParamsByNames which does not seem to be called when using the odbc connection. Am I correct? If so, what is the maximum number of parameters that can be used in a query, or is this limited to a byte size and not a count?
Would it be possible for me to determine this limit in my code before running the query?
Offline
ReplaceParamsByNames can replace up to (Ord('Z')-Ord('A'))^2-19 = 606 parameters (19 is a length(SQL_KEYWORDS)-1)
In case of ODBC, statement is passed to ODBC driver with ?, so ReplaceParamsByNumbers not used.
In case of SynDBOracle/SynDBPostgres limitation is 999 (ReplaceParamsByNumbers used instead of ReplaceParamsByNames)
Last edited by mpv (2020-09-16 18:53:35)
Offline
Thanks @mpv. That is exactly the info I was looking for
Offline
Pages: 1