eRx captured and displayed in AMC report,
[openemr.git] / library / adodb / drivers / adodb-access.inc.php
blobeea7ccf890215ffd158ca4beac9500cf46670e0d
1 <?php
2 /*
3 V5.14 8 Sept 2011 (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
4 Released under both BSD license and Lesser GPL library license.
5 Whenever there is any discrepancy between the two licenses,
6 the BSD license will take precedence. See License.txt.
7 Set tabs to 4 for best viewing.
9 Latest version is available at http://adodb.sourceforge.net
11 Microsoft Access data driver. Requires ODBC. Works only on MS Windows.
13 if (!defined('_ADODB_ODBC_LAYER')) {
14 if (!defined('ADODB_DIR')) die();
16 include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
18 if (!defined('_ADODB_ACCESS')) {
19 define('_ADODB_ACCESS',1);
21 class ADODB_access extends ADODB_odbc {
22 var $databaseType = 'access';
23 var $hasTop = 'top'; // support mssql SELECT TOP 10 * FROM TABLE
24 var $fmtDate = "#Y-m-d#";
25 var $fmtTimeStamp = "#Y-m-d h:i:sA#"; // note not comma
26 var $_bindInputArray = false; // strangely enough, setting to true does not work reliably
27 var $sysDate = "FORMAT(NOW,'yyyy-mm-dd')";
28 var $sysTimeStamp = 'NOW';
29 var $hasTransactions = false;
30 var $upperCase = 'ucase';
32 function ADODB_access()
34 global $ADODB_EXTENSION;
36 $ADODB_EXTENSION = false;
37 $this->ADODB_odbc();
40 function Time()
42 return time();
45 function BeginTrans() { return false;}
47 function IfNull( $field, $ifNull )
49 return " IIF(IsNull($field), $ifNull, $field) "; // if Access
52 function MetaTables()
54 global $ADODB_FETCH_MODE;
56 $savem = $ADODB_FETCH_MODE;
57 $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
58 $qid = odbc_tables($this->_connectionID);
59 $rs = new ADORecordSet_odbc($qid);
60 $ADODB_FETCH_MODE = $savem;
61 if (!$rs) return false;
63 $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
65 $arr = $rs->GetArray();
66 //print_pre($arr);
67 $arr2 = array();
68 for ($i=0; $i < sizeof($arr); $i++) {
69 if ($arr[$i][2] && $arr[$i][3] != 'SYSTEM TABLE')
70 $arr2[] = $arr[$i][2];
72 return $arr2;
73 }*/
77 class ADORecordSet_access extends ADORecordSet_odbc {
79 var $databaseType = "access";
81 function ADORecordSet_access($id,$mode=false)
83 return $this->ADORecordSet_odbc($id,$mode);
85 }// class