ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:database:odbc

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:odbc [2015/12/03 20:17] mnewnhamv5:database:odbc [2020/01/13 13:07] – Add tier2 tag dregad
Line 14: Line 14:
 ^ADOdb V6|Yes| ^ADOdb V6|Yes|
 == Alternatives == == Alternatives ==
-[[database:pdo#pdo_odbc|PDO driver for ODBC]]+[[v5:database:pdo#pdo_odbc|PDO driver for ODBC]]
 </WRAP> </WRAP>
   * This generic driver can be used with any database with ODBC connection support.    * This generic driver can be used with any database with ODBC connection support. 
Line 26: Line 26:
   * SQL_CUR_USE_ODBC     * SQL_CUR_USE_ODBC  
   * SQL_CUR_USE_DRIVER    * SQL_CUR_USE_DRIVER 
-The cursor is set by passing it as the 4<sup>th</sup> argument to the connect statement+The cursor is set by setting the ''curmode'' prior to the connect statement
 <code php> <code php>
 include 'adodb/adodb.inc.php'; include 'adodb/adodb.inc.php';
 $db = newAdoConnection('odbc'); $db = newAdoConnection('odbc');
-$db->connect('northwind','','',SQL_CUR_USE_ODBC);+ 
 +$db->curmode = SQL_CUR_USE_IF_NEEDED; 
 + 
 +$db->connect('northwind');
 </code> </code>
  
Line 46: Line 49:
 ^ADOdb V6|Yes| ^ADOdb V6|Yes|
 == Alternatives ==  == Alternatives == 
-[[database:microsoft_sql_server#mssqlnative|SQL Server]]+[[v5:database:microsoft_sql_server#mssqlnative|SQL Server]] 
 +</WRAP> 
 +When used on Windows clients, this driver needs the Microsoft SQL server native client. There are feature limitations compared to the ''mssqlnative'' driver, use of that is always recommended. If you are using the driver with SQL Server versions 2012 and higher, consider using the odbc_mssql2012 driver instead, as 2012+ database specific fixes will be placed into that driver. 
 +------------------------------------ 
 +===== odbc_mssql2012 ===== 
 +<WRAP right box round 300px> 
 +== From ADOdb V5.21 == 
 +== Specification == 
 +^Driver Name|odbc_mssql2012| 
 +^Data Provider|odbc| 
 +^Status|Active((This driver is actively supported by ADOdb project members))| 
 +^Windows|Yes| 
 +^Unix|No| 
 +^ADOdb V5|Yes| 
 +^ADOdb V6|Yes|
 </WRAP> </WRAP>
-When used on Windows clients, this driver needs the Microsoft SQL server native client. There are feature limitations compared to the ''mssqlnative'' driveruse of that is always recommended.+When used with SQL Server 2012concatenation of strings results in a different behaviour compared with earlier versions. [[http://blog.sqlauthority.com/2013/05/12/sql-server-interesting-observation-of-concat_null_yields_null-and-concat-in-sql-server-2012-onwards/|This article]] explains the difference.
 --------------------------- ---------------------------
 ===== odbc_oracle ===== ===== odbc_oracle =====
Line 78: Line 95:
 ^ADOdb V5|Yes| ^ADOdb V5|Yes|
 ^ADOdb V6|Yes| ^ADOdb V6|Yes|
 +== Alternatives ==
 +[[v5:database:ibm_db2|IBM DB2 Native Mode Driver]]
 </WRAP> </WRAP>
 Connects to DB2 database using either the IBM or 3rd party ODBC driver Connects to DB2 database using either the IBM or 3rd party ODBC driver
Line 100: Line 119:
  
 ===== Feature Limitations ===== ===== Feature Limitations =====
-ODBC connections have functionality limitations include transactional handling. See the [[database:feature_comparison|Feature Matrix]] for more information +ODBC connections have functionality limitations include transactional handling. See the [[v5:database:feature_comparison|Feature Matrix]] for more information 
-{{tag>[odbc windows active supported]}}+{{tag>[odbc windows active supported tier2]}}
v5/database/odbc.txt · Last modified: 2021/01/11 09:59 by peterdd