diff options
Diffstat (limited to 'framework/Data')
-rw-r--r-- | framework/Data/Common/Mssql/TMssqlMetaData.php | 4 | ||||
-rw-r--r-- | framework/Data/TDbConnection.php | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/framework/Data/Common/Mssql/TMssqlMetaData.php b/framework/Data/Common/Mssql/TMssqlMetaData.php index 8309e4ec..2751caf3 100644 --- a/framework/Data/Common/Mssql/TMssqlMetaData.php +++ b/framework/Data/Common/Mssql/TMssqlMetaData.php @@ -53,9 +53,9 @@ class TMssqlMetaData extends TDbMetaData AND t.table_name = :table EOD; if($schemaName!==null) - $sql .= ' AND t.schema_name = :schema'; + $sql .= ' AND t.table_schema = :schema'; if($catalogName!==null) - $sql .= ' AND t.catalog_name = :catalog'; + $sql .= ' AND t.table_catalog = :catalog'; $command = $this->getDbConnection()->createCommand($sql); $command->bindValue(':table', $tableName); 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));
}
|