MariaDb: right syntax of PREPARE statement for CONNECT type tables when passing string variable I run 10.4.12-MariaDB on Windows10 and I use 64-bit ODBC driver to connect tables from MS Access to MariaDB database. I am fighting with the right syntax of PREPARE statement for CONNECT type tables.

Having a table named fff which is ENGINE=CONNECT TABLE_TYPE=ODBC , I try to run prepared statements on it.
While I have no trouble to run statement with integer type parameter:

set @createStr = ("select * from fff where reltpfak = ? ");
prepare theSQL from @createStr ;
set @i = 1;
execute theSQL using @i;
-- works! 


I can not find a right syntax to pass string variable. My trials lead to an error:

set @createStr = ("select reltpfak from fa where Firma = ? ;");
prepare theSQL from @createStr ;
set @i = "NameOfCompany";
execute theSQL using @i; 


returns Incorrect arguments to EXECUTE .

The same one just with added ' around '?'

set @createStr = ("select reltpfak from fa where Firma = '?' ;")
prepare theSQL from @createStr ;
set @i = "NameOfCompany";
execute theSQL using @i


returns Error: Got error 174 'SQLExecDirect: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Firma= NameOfCompany'.' from CONNECT .

What is the right syntax of PREPARE statement for CONNECT type tables when passing string variable?
This looks like a bug as you can run this code just fine against an InnoDB table. It should work the same way against a Connect table, but apparently it doesn't. So I'd suggest you file a bug report in the MariaDB Server Jira project.