I am trying to run a simple statement to access a database to search for records.
Checking the data in the records was terrible, and I cannot sanitize it. Value, it must be saved as is.
I need to be able to search for a string with a space and hyphen characters. The following statement will work in Access 2010 direct:
select * from dummy where Replace(Replace([data1],' ',''),'-','') = 'ABCD1234';
Running it from an ODBC connection through PHP will not. It raises the following error:
SQL error: [Microsoft][ODBC Microsoft Access Driver] Undefined function 'Replace' in expression., SQL state 37000 in SQLExecDirect
Creating a query in a database that runs this function and tries to look for its values ββindirectly causes the same error:
select * from dummy_indirect where Expr1 = 'ABCD1234';
I tried using both ODBC drivers. ODBCJR32.dll (03/22/2010) and ACEODBC.dll (02/18/2007). As far as I know, they should be current as they were installed with the full Access 2010 and Access Database Database Engine.
, , . , , . mdb, , .
* *
OleDB .
$dsn= "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\dummy.mdb;";
-. .
, , Access . , . , API Apache/PHP, , .
- , , (Autonumber ). ( ), , , - , -, LIKE .
replace(), , ODBC- , , ?