From c5c397a55dd9d9026247377c3a0daa7517393d06 Mon Sep 17 00:00:00 2001 From: "christophe.boulain" <> Date: Wed, 19 Jan 2011 14:02:27 +0000 Subject: Raise an exception when DB driver doesn't support changing charset. Also some minor MSSQL fixes --- framework/Data/TDbConnection.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'framework/Data/TDbConnection.php') 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)); } -- cgit v1.2.3