diff options
author | christophe.boulain <> | 2011-01-19 14:02:27 +0000 |
---|---|---|
committer | christophe.boulain <> | 2011-01-19 14:02:27 +0000 |
commit | c5c397a55dd9d9026247377c3a0daa7517393d06 (patch) | |
tree | bfdd46703f7cb29b1043ef614d819f391754d36c /framework/Data/TDbConnection.php | |
parent | bcb739cb347c609d75eaa8c27db1b1b5619bba35 (diff) |
Raise an exception when DB driver doesn't support changing charset.
Also some minor MSSQL fixes
Diffstat (limited to 'framework/Data/TDbConnection.php')
-rw-r--r-- | framework/Data/TDbConnection.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/framework/Data/TDbConnection.php b/framework/Data/TDbConnection.php index 3709f4d4..4dccbad1 100644 --- a/framework/Data/TDbConnection.php +++ b/framework/Data/TDbConnection.php @@ -222,6 +222,11 @@ class TDbConnection extends TComponent case 'pgsql':
$stmt = $this->_pdo->prepare('SET client_encoding TO ?');
break;
+ case 'sqlite':
+ $stmt = $pdo->prepare ('SET NAMES ?');
+ break;
+ default:
+ throw new TDbException('dbconnection_unsupported_driver_charset', $driver);
}
$stmt->execute(array($this->_charset));
}
|