Article ID: 191971 - Last Review: March 7, 2005 - Revision: 1.2 FIX: Incorrect Results Using Distinct Keyword with Recordset DTCThis article was previously published under Q191971 On This PageSYMPTOMS
When supplying a SQL statement to the Recordset DTC that uses the DISTINCT
keyword, the resulting recordset contains the wrong number of records in
the resultset. Duplicate records should be ignored as specified by the
DISTINCT keyword. However, duplicate records are being returned.
RESOLUTION
To work around this behavior, set the cursor location to be server-side:
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base: MORE INFORMATIONSteps to Reproduce BehaviorThe following steps require a data connection to SQL Server's PUBS database:
However, when running the same query in SQL Server's ISQL_w, or by changing the Recordset DTC's curor location to "server-side" the following correct results are returned (this is from ISQL_w): title_id -------- BU1032 BU1111 BU2075 BU7832 MC2222 MC3021 PC1035 PC8888 PC9999 PS1372 PS2091 PS2106 PS3333 PS7777 TC3218 TC4203 TC7777 (17 row(s) affected)
| Article Translations
|
Back to the top
