Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/adodb/drivers/adodb-access.inc.php
Go to the documentation of this file.
00001 <?php
00002 /* 
00003 V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
00004   Released under both BSD license and Lesser GPL library license. 
00005   Whenever there is any discrepancy between the two licenses, 
00006   the BSD license will take precedence. See License.txt. 
00007   Set tabs to 4 for best viewing.
00008   
00009   Latest version is available at http://adodb.sourceforge.net
00010   
00011   Microsoft Access data driver. Requires ODBC. Works only on MS Windows.
00012 */
00013 if (!defined('_ADODB_ODBC_LAYER')) {
00014         if (!defined('ADODB_DIR')) die();
00015         
00016         include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
00017 }
00018  if (!defined('_ADODB_ACCESS')) {
00019         define('_ADODB_ACCESS',1);
00020 
00021 class  ADODB_access extends ADODB_odbc {        
00022         var $databaseType = 'access';
00023         var $hasTop = 'top';            // support mssql SELECT TOP 10 * FROM TABLE
00024         var $fmtDate = "#Y-m-d#";
00025         var $fmtTimeStamp = "#Y-m-d h:i:sA#"; // note not comma
00026         var $_bindInputArray = false; // strangely enough, setting to true does not work reliably
00027         var $sysDate = "FORMAT(NOW,'yyyy-mm-dd')";
00028         var $sysTimeStamp = 'NOW';
00029         var $hasTransactions = false;
00030         var $upperCase = 'ucase';
00031         
00032         function ADODB_access()
00033         {
00034         global $ADODB_EXTENSION;
00035         
00036                 $ADODB_EXTENSION = false;
00037                 $this->ADODB_odbc();
00038         }
00039         
00040         function Time()
00041         {
00042                 return time();
00043         }
00044         
00045         function BeginTrans() { return false;}
00046         
00047         function IfNull( $field, $ifNull ) 
00048         {
00049                 return " IIF(IsNull($field), $ifNull, $field) "; // if Access
00050         }
00051 /*
00052         function MetaTables()
00053         {
00054         global $ADODB_FETCH_MODE;
00055         
00056                 $savem = $ADODB_FETCH_MODE;
00057                 $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
00058                 $qid = odbc_tables($this->_connectionID);
00059                 $rs = new ADORecordSet_odbc($qid);
00060                 $ADODB_FETCH_MODE = $savem;
00061                 if (!$rs) return false;
00062                 
00063                 $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
00064                 
00065                 $arr = $rs->GetArray();
00066                 //print_pre($arr);
00067                 $arr2 = array();
00068                 for ($i=0; $i < sizeof($arr); $i++) {
00069                         if ($arr[$i][2] && $arr[$i][3] != 'SYSTEM TABLE')
00070                                 $arr2[] = $arr[$i][2];
00071                 }
00072                 return $arr2;
00073         }*/
00074 }
00075 
00076  
00077 class  ADORecordSet_access extends ADORecordSet_odbc {  
00078         
00079         var $databaseType = "access";           
00080         
00081         function ADORecordSet_access($id,$mode=false)
00082         {
00083                 return $this->ADORecordSet_odbc($id,$mode);
00084         }
00085 }// class
00086 } 
00087 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations