ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:database:access

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
database:access [2015/07/24 20:37] mnewnhamv5:database:access [2019/12/29 21:27] mnewnham
Line 1: Line 1:
-<WRAP right info> +====== Microsoft Access ====== 
-[[feature_comparison|Feature Comparison Matrix]] +~~NOTOC~~ 
-</WRAP> + 
-====== Microsoft Access ===== + 
-<WRAP round info+<WRAP right box round 300px
-See also the [[ADO]] and [[PDO]] drivers for Access+== Specification == 
 +^Driver Name|access| 
 +^Data Provider|odbc| 
 +^Status|Active((This driver is actively supported by ADOdb project members)) | 
 +^Windows|Yes| 
 +^Unix|No| 
 +^ADOdb V5|Yes| 
 +^ADOdb V6|Yes| 
 +== Alternatives == 
 +[[v5:database:pdo#pdo_access|PDO Driver For Access]]
 </WRAP> </WRAP>
  
-===== Description ===== +This driver provides a connection to Microsoft Access databases, via an ODBC connection. The easiest way to connect to the database is to define a DSN in the ODBC connection manager and connect via that.
-This driver provides a connection to Microsoft Access databases, via an ODBC connection. +
-===== Specification ====== +
-|Driver Name|access| +
-|Status|Active| +
-|Supported OS|Windows|+
  
 ===== Driver Specific Options ===== ===== Driver Specific Options =====
 None None
 +===== Driver Specific Issues =====
 +In ADOdb V5, the field type returned in [[v5:dictionary:metacolumns]] is the metaType, not the actualType. For more on this issue, see [[https://github.com/ADOdb/ADOdb/issues/184|This Thread]] on Github. This behaviour changed in Version 5.21, but a backward compatibility mode is provided:
 +-----------------------
 +<code php>
 +$db = newAdoConnection('access');
 +$db->metaColumnsReturnType = METACOLUMNS_RETURNS_META;
 +</code>
  
 +Depending on the database security, some meta functions may not be available. For more information, try this [[http://stackoverflow.com/questions/1937703/record-cannot-be-read-no-read-permission-on-msysobjects|Stack Overflow]] response.
 +---------------------------
 ===== Connection Parameters Guidelines ===== ===== Connection Parameters Guidelines =====
 +==== Using a DSN Style Connection ====
 ^Field^Description^Common Example^ ^Field^Description^Common Example^
-|$host||| +|$host|Use for the ODBC DSN Name|northwind
-|$userName||| +|$userName|Not Required|| 
-|$password||| +|$password|Not Required|| 
-|$database||| +|$database|Not Required||
-===== Connection Example =====+
  
 +=== Example ===
 +<code php>
 +$db= newAdoConnection('access');
 +$db->connect('northwind'); 
  
- +$sql 'select * from products'; 
-==== DSN-less ODBC ==== +$result$db->Execute($sql); 
- +</code> 
-ODBC DSNs can be created in the ODBC control panel, or you can use a DSN-less connection+===== Using a DSN less connection =====
  
 <code php> <code php>
Line 41: Line 57:
 </code> </code>
  
-{{tag>[access]}}+{{tag>[access supported]}}
  
v5/database/access.txt · Last modified: 2020/01/13 13:06 by dregad