|
Adodb Dokumentation
V5.14 8 Sept 2011
|
00001 <?php 00002 00013 // security - hide paths 00014 if (!defined('ADODB_DIR')) die(); 00015 00016 class ADODB2_access extends ADODB_DataDict { 00017 00018 var $databaseType = 'access'; 00019 var $seqField = false; 00020 00021 00022 function ActualType($meta) 00023 { 00024 switch($meta) { 00025 case 'C': return 'TEXT'; 00026 case 'XL': 00027 case 'X': return 'MEMO'; 00028 00029 case 'C2': return 'TEXT'; // up to 32K 00030 case 'X2': return 'MEMO'; 00031 00032 case 'B': return 'BINARY'; 00033 00034 case 'TS': 00035 case 'D': return 'DATETIME'; 00036 case 'T': return 'DATETIME'; 00037 00038 case 'L': return 'BYTE'; 00039 case 'I': return 'INTEGER'; 00040 case 'I1': return 'BYTE'; 00041 case 'I2': return 'SMALLINT'; 00042 case 'I4': return 'INTEGER'; 00043 case 'I8': return 'INTEGER'; 00044 00045 case 'F': return 'DOUBLE'; 00046 case 'N': return 'NUMERIC'; 00047 default: 00048 return $meta; 00049 } 00050 } 00051 00052 // return string must begin with space 00053 function _CreateSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) 00054 { 00055 if ($fautoinc) { 00056 $ftype = 'COUNTER'; 00057 return ''; 00058 } 00059 if (substr($ftype,0,7) == 'DECIMAL') $ftype = 'DECIMAL'; 00060 $suffix = ''; 00061 if (strlen($fdefault)) { 00062 //$suffix .= " DEFAULT $fdefault"; 00063 if ($this->debug) ADOConnection::outp("Warning: Access does not supported DEFAULT values (field $fname)"); 00064 } 00065 if ($fnotnull) $suffix .= ' NOT NULL'; 00066 if ($fconstraint) $suffix .= ' '.$fconstraint; 00067 return $suffix; 00068 } 00069 00070 function CreateDatabase($dbname,$options=false) 00071 { 00072 return array(); 00073 } 00074 00075 00076 function SetSchema($schema) 00077 { 00078 } 00079 00080 function AlterColumnSQL($tabname, $flds) 00081 { 00082 if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported"); 00083 return array(); 00084 } 00085 00086 00087 function DropColumnSQL($tabname, $flds) 00088 { 00089 if ($this->debug) ADOConnection::outp("DropColumnSQL not supported"); 00090 return array(); 00091 } 00092 00093 } 00094 00095 00096 ?>