[!!!][TASK] Doctrine: Remove ext:dbal
[Packages/TYPO3.CMS.git] / typo3 / sysext / adodb / adodb / drivers / adodb-access.inc.php
1 <?php
2 /*
3 @version v5.20.3 01-Jan-2016
4 @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
5 @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
6 Released under both BSD license and Lesser GPL library license.
7 Whenever there is any discrepancy between the two licenses,
8 the BSD license will take precedence. See License.txt.
9 Set tabs to 4 for best viewing.
10
11 Latest version is available at http://adodb.sourceforge.net
12
13 Microsoft Access data driver. Requires ODBC. Works only on MS Windows.
14 */
15 if (!defined('_ADODB_ODBC_LAYER')) {
16 if (!defined('ADODB_DIR')) die();
17
18 include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
19 }
20 if (!defined('_ADODB_ACCESS')) {
21 define('_ADODB_ACCESS',1);
22
23 class ADODB_access extends ADODB_odbc {
24 var $databaseType = 'access';
25 var $hasTop = 'top'; // support mssql SELECT TOP 10 * FROM TABLE
26 var $fmtDate = "#Y-m-d#";
27 var $fmtTimeStamp = "#Y-m-d h:i:sA#"; // note not comma
28 var $_bindInputArray = false; // strangely enough, setting to true does not work reliably
29 var $sysDate = "FORMAT(NOW,'yyyy-mm-dd')";
30 var $sysTimeStamp = 'NOW';
31 var $hasTransactions = false;
32 var $upperCase = 'ucase';
33
34 function __construct()
35 {
36 global $ADODB_EXTENSION;
37
38 $ADODB_EXTENSION = false;
39 parent::__construct();
40 }
41
42 function Time()
43 {
44 return time();
45 }
46
47 function BeginTrans() { return false;}
48
49 function IfNull( $field, $ifNull )
50 {
51 return " IIF(IsNull($field), $ifNull, $field) "; // if Access
52 }
53 /*
54 function MetaTables()
55 {
56 global $ADODB_FETCH_MODE;
57
58 $savem = $ADODB_FETCH_MODE;
59 $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
60 $qid = odbc_tables($this->_connectionID);
61 $rs = new ADORecordSet_odbc($qid);
62 $ADODB_FETCH_MODE = $savem;
63 if (!$rs) return false;
64
65 $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
66
67 $arr = $rs->GetArray();
68 //print_pre($arr);
69 $arr2 = array();
70 for ($i=0; $i < sizeof($arr); $i++) {
71 if ($arr[$i][2] && $arr[$i][3] != 'SYSTEM TABLE')
72 $arr2[] = $arr[$i][2];
73 }
74 return $arr2;
75 }*/
76 }
77
78
79 class ADORecordSet_access extends ADORecordSet_odbc {
80
81 var $databaseType = "access";
82
83 function __construct($id,$mode=false)
84 {
85 return parent::__construct($id,$mode);
86 }
87 }// class
88 }