DB2 - Problembeschreibung
| Problem IC67227 | Status: Geschlossen |
THE WRONG ROW MIGHT BE FETCHED WHEN USING ADO WITH ODBC OR USING CLI WITH SQL_ATTR_RETRIEVE_DATA=0 IN A SCROLLABLE CURSOR. | |
| Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
| Problembeschreibung: | |
The wrong row might be fetched when using Microsoft ADO with the
Microsoft OLEDB-ODBC bridge provider (MSDASQL) or running a CLI
application and using the SQLSetStmtAttr() attribute,
SQL_ATTR_RETRIEVE_DATA with a value of 0 when using a scrollable
cursor.
The problem stems from the DB2 cursor manager making a request
to get a second row when it should have only made a request for
one row.
Here is some sample ADO code that represents this problem:
intCount = 0
Do Until objRS.EOF
intCount = intCount + 1
objRS.MoveNext
Loop
objRS.Close
strMsg = strMsg & " The recordset contains " & intCount & "
records." & vbCrLf
The number of rows returned by the loop is one less than the
number of actual rows in the entire cursor. | |
| Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * The wrong row might be fetched when using Microsoft ADO with * * the Microsoft OLEDB-ODBC bridge provider (MSDASQL) or * * running a CLI application and using the SQLSetStmtAttr() * * attribute, SQL_ATTR_RETRIEVE_DATA with a value of 0 when * * using a scrollable cursor. * * . * * The problem stems from the DB2 cursor manager making a * * request to get a second row when it should have only made a * * request for one row. * * . * * Here is some sample ADO code that represents this problem: * * . * * intCount = 0 * * Do Until objRS.EOF * * intCount = intCount + 1 * * objRS.MoveNext * * Loop * * objRS.ClosestrMsg = strMsg & " The recordset contains " & * * intCount & "records." & vbCrLf * * . * * The number of rows returned by the loop is one less than the * * number of actual rows in the entire cursor. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.7, Fixpak 3 * **************************************************************** | |
| Local-Fix: | |
If connecting to a DB2 for z/OS server, then using a keyset cursor will workaround the problem, otherwise a non-scrollable cursor will work against any DB2 server. If using ADO, then the IBM OLE DB provider (IBMDADB2) will workaround the problem as well. | |
| verfügbare FixPacks: | |
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows | |
| Lösung | |
First fixed in DB2 UDB Version 9.7, Fixpak 3 | |
| Workaround | |
see LOCAL FIX | |
| Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 15.03.2010 27.09.2010 27.09.2010 |
| Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7. | |
| Problem behoben lt. FixList in der Version | |
| 9.7.0.3 |
|
| 9.7.0.3 |
|