fuel / core

Fuel PHP Framework - The core of the Fuel v1 framework
http://fuelphp.com
807 stars 340 forks source link

set_charset() throws exception on Ms Access and SQLite. #1689

Closed perdodi closed 9 years ago

perdodi commented 10 years ago

PDO connection.php throws exception when setting charset ("SET NAMES") on Ms Access:

PDOException [ 42000 ]:
SQLSTATE[42000]: Syntax error or access violation: -3500 [Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'. (SQLExecDirect[-3500] at ext\pdo_odbc\odbc_driver.c:247)

and SQLite:

PDOException [ HY000 ]:
SQLSTATE[HY000]: General error: 1 near "SET": syntax error

Where database settings are:

'dsn' => 'odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=database.mdb;Uid=',

and

'dsn' => 'sqlite:database.sqlite',

On SQLite PRAGMA encoding = ... would help instead of SET NAMES, but I don't know what to do with MsAccess.

WanWizard commented 10 years ago

MS what? ;-)

I guess you PR has fixed this?

WanWizard commented 9 years ago

Guess it did...