ParamByName strange errors lazarus / 16-Databases ---------------------------------------------------------------------- luca · 2013-09-27 12:31 I'd a strange behaviour using TSQLQuery linked to TODBCConnection. I inserted a SQL statement (Insert Into) with 15 parameters by using the SQL editor in IDE. I ran the query and there was a SIGSEGV error in the assignment of one of the 15 parameters (all the others assignement worked well): qry.paramByName('P').Value:=0; I changed the dataType of parameter from ftUnknown to ftFloat and modify the instruction from qry.paramByName('P').Value:=0; to qry.paramByName('P').asFloat:=0; And the error disapperad. After that another error appeared. In fact it's not an error but the execution stopped in IDE and the assembler debug appeared inside of the function  ntdll!TpWaitForAlpcCompletion. In this case I changed the position of parameter P into the SQL text, remove some spaces and line break in the SQL Text and the error disappeared! Now all is working fine but this is really strange. ---------------------------------------------------------------------- LacaK · 2013-09-27 18:20 If you can prepare small example application, which will reproduce behavior you have described I would like to look at it. ---------------------------------------------------------------------- luca · 2013-09-27 19:06 Thank for reply. I agree with you about the need to provide an example BUT the real problem is that this bug appeared only in one of the six queries with a lot of parameters. In my opinion the issue is linked to the way the SQL text is parsed; it can be some chars can modify the way the parameters are identified and named in the sql text and this provoked the issue. In any case I'll try to reproduce the error.