I migrated a project to the new version of phpmaker v2025.4.0, and everything in order, except a small error that I just realized that appears, I have put in a field the Filter option, so that it looks like in Excel, when I select the filter icon, the data is displayed correctly (The data is bringing them to me from lookup table, where the link field is the ID[int]), but when I select one to make me the filter, I get the following error:
“…\vendor\doctrine\dbal\src\Driver\API\SQLSrv\ExceptionConverter.php(34): An exception occurred while executing a query: SQLSTATE [42S02, 208]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid object name ‘STRING_SPLIT’. SQLSTATE [42000, 8180]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Statement(s) could not be prepared.”
STRING_SPLIT requires SQL Server 2016 (13.x) and later. DBAL 4 (used by v2025) requires SQL Server 2017 and above. If you use older version of SQL Server, it is recommended that you upgrade to SQL Server 2017 or later.
I changed my data base to SQL Server 2019, but still appear an error, its kind similar error:
“\vendor\doctrine\dbal\src\Driver\API\SQLSrv\ExceptionConverter.php(46): An exception occurred while executing a query: SQLSTATE [42000, 8116]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Argument data type int is invalid for argument 1 of string_split function. SQLSTATE [42000, 8180]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Statement(s) could not be prepared.”
The problem is only when the column has lookup and the Link field is int, I made a test of a column that is varchar, and it does not have lookup and it works without any problem.
I’ve run into this as well:
SQL 2017 running on Windows server 2016
Updated to 2025.5 and regenerated all files, clearing the project folder first.
Not sure if it’s a driver issue or a server version issue.
Just thought I would add to the information stream.
Doctrine \ DBAL \ Exception \ TableNotFoundException (208)
An exception occurred while executing a query: SQLSTATE [42S02, 208]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Invalid object name 'STRING_SPLIT'. SQLSTATE [42000, 8180]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Statement(s) could not be prepared.
SQL SERVER VERSION INFO: Microsoft SQL Server 2017 (RTM-CU31-GDR) (KB5046858) - 14.0.3485.1 (X64)
Oct 17 2024 16:14:54
Copyright (C) 2017 Microsoft Corporation
Standard Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)
Quick update. My issue was caused by the compatibility level of my database. This does not automatically increase if you upgrade your version of SQL or migrate a database from an older version of SQL Server.
You should check your version and support to understand what changing compatibility levels will do in your environment.
I have the same error. Using version 2025.12 and sql 2017.
So when using the header filter on a column (in the list view) of format ‘bit’ I get the error below.
\vendor\doctrine\dbal\src\Driver\API\SQLSrv\ExceptionConverter.php(46): An exception occurred while executing a query: SQLSTATE [42000, 8116]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Argument data type int is invalid for argument 1 of string_split function. SQLSTATE [42000, 8180]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Statement(s) could not be prepared.
I tried all combinations in phpmaker to bypass this error. So Value 0 and 1 with Label Yes and No. But also 0,1 and 0,1 and even False, True. Nothing seems to work.
SELECT COUNT(*) FROM (SELECT * FROM dbo.[Activity] WHERE EXISTS (SELECT * FROM STRING_SPLIT([ACTIVE], '|') WHERE value IN ('1'))) COUNT_TABLE
The advanced setting show ‘,’ a comma as multiple option separator but phpmaker uses ‘|’
Msg 8116, Level 16, State 1, Line 27 Argument data type bit is invalid for argument 1 of string_split function.
So The column [ACTIVE] in dbo.[Activity] is of type BIT.
But STRING_SPLIT requires its first argument to be nvarchar or varchar. Passing a BIT throws the error.
The fix for multi value filter in v2025 (GetMultiValueFilter) destroyed the single filter functionality. (phpfn.php line 1204)
Change it to something like this:
$sql = "EXISTS (SELECT * FROM STRING_SPLIT(CAST({$expression} AS NVARCHAR(10)), '{$sep}') WHERE value IN ({$values}))";
That seems to work for the BIT columns (not for some INT columns). And when I click the filter icon on a ‘BIT’ column I still see ‘undefined’ and ‘1’ as options although I use labels ‘Yes’ and ‘No’.