[TYPO3-core] FYI #13766: Auto-increment does not work with driver odbc_mssql [adodb]

Xavier Perseguers typo3 at perseguers.ch
Mon Mar 8 20:00:13 CET 2010


Hi,

FYI following patch was committed to trunk (rev. 7089) and 4-3 (rev. 7090-7091).

Type: Bugfix

Bugtracker reference:
http://bugs.typo3.org/view.php?id=13766

Branches: trunk, 4-3

Problem:
In short, some ODBC drivers do not return a meaningful value when calling method odbc_num_rows(). This prevents ADOdb from successfully generate an id for new records and instead use '0' as uid. My 
setup involved unixODBC 2.2.14 and FreeTDS 0.82 (on Mac OS X) to connect to a MSSQL2000 database (on Windows XP).

Discussion of problem of odbc_num_rows() may be found on [1]

Solution:
Add special handling in ADOdb method used to generate new id to circumvent this problem whenever it occurs.

Note:
I sent an email to ADOdb maintainer for inclusion in next release of ADOdb, but as I try to fix some really old bugs in DBAL related to MSSQL and releases of ADOdb are really seldom, I committed this.

Cheers

[1] http://ch2.php.net/manual/en/function.odbc-num-rows.php

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 13766.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100308/229622e0/attachment.txt>


More information about the TYPO3-team-core mailing list