00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 require_once 'creole/metadata/DatabaseInfo.php';
00023
00031 class MSSQLDatabaseInfo extends DatabaseInfo {
00032
00037 protected function initTables()
00038 {
00039 include_once 'creole/drivers/mssql/metadata/MSSQLTableInfo.php';
00040
00041 $dsn = $this->conn->getDSN();
00042
00043
00044 if (!@mssql_select_db($this->dbname, $this->conn->getResource())) {
00045 throw new SQLException('No database selected');
00046 }
00047
00048 $result = mssql_query("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME <> 'dtproperties'", $this->conn->getResource());
00049
00050 if (!$result) {
00051 throw new SQLException("Could not list tables", mssql_get_last_message());
00052 }
00053
00054 while ($row = mssql_fetch_row($result)) {
00055 $this->tables[strtoupper($row[0])] = new MSSQLTableInfo($this, $row[0]);
00056 }
00057 }
00058
00064 protected function initSequences()
00065 {
00066
00067 }
00068
00069 }