Apache OpenOffice (AOO) Bugzilla – Issue 116509
first records ignored with a certain connection types
Last modified: 2011-04-02 07:49:31 UTC
A request in SQL mode Using a view on SQL Server with an outer join on a table which is not the main table gives a resultset with the first result is ignored. Example LEFT OUTER JOIN tache_programmee AS tp ON tp.TAPR_CODE_INTERNE=e.TAPR_CODE_INTERNE AND p.ID_SERVICE_ORIGINE=e.ID_SERVICE_ORIGINE_TACHE LEFT OUTER JOIN activite_dg AS a ON a.ACDG_CODE_INTERNE=tp.ACDG_CODE_INTERNE E is the main table (FROM table) tested with order by and order by desc => the first row is ignored
What type of connection you used ODBC or JDBC, ADO etc.? What SQL server version. Which Driver? Without ORDER BY the query works correctly?
What type of connection you used ODBC or JDBC, ADO etc.? ADO What SQL server version. 8.0.927 Which Driver? Microsoft Ole Db provider for SQL Server No problem with 3.21 More tests tomorrow
No problem with ODBC Same problem with ADO and driver Native SQL
>Without ORDER BY the query works correctly?
Without ORDER BY the query works correctly? No, it dont. Order by was used to find out that's the first row of the resultset which was ignored. Same problem with RC10
After further tests the problem comes with a request on a vue who contains sub-requests. exemple: ef.id_annee AS id_annee_fact, ef.id_facture, ( SELECT COUNT(*) FROM ech_tracesuppression WHERE unfct_ident=e.unfct_ident AND annee=e.annee AND numlabo=e.numlabo AND tacheprogrammee='1' ) AS nbModification, CAST(NULL AS integer) AS id_anatype FROM echantillon AS e etc...
If you run subquery alone it gives good results?
All subqueries give good results. the query SELECT e.unfct_ident, e.annee, e.numlabo, tp.TAPR_LIB_TACHE, tp.TAPR_CODE_TACHE, a.ACDG_CODE_ACTION FROM echantillon AS e LEFT OUTER JOIN tache_programmee AS tp ON tp.TAPR_CODE_INTERNE=e.TAPR_CODE_INTERNE AND tp.ID_SERVICE_ORIGINE=e.ID_SERVICE_ORIGINE_TACHE LEFT OUTER JOIN activite_dg AS a ON a.ACDG_CODE_INTERNE=tp.ACDG_CODE_INTERNE WHERE e.annee=2010 and e.numlabo<3 has as result the row 170 2010 2 0 0 32 with WHERE e.annee=2010 and e.numlabo=2 no result was found
I confirm it I found similar or same problem with different MS drivers to MS accees files fails with ADO, and mdb driwer works with ODBC. I investigated with other MS connected product and find that the mdb driver for msaccess nwind.mdb example file has a same problem, with first records. Download Northwind example file, unpack it: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=C6661372-8DBE-422B-8676-C632D66C529C&displaylang=EN Create connection to this nwind.mdb file through New>database>connect to existing database>Microsoft Access, open Product table -> Missing record to ProductID=1. The mdb driver recognize ProductID as Integer[long]and shows as PK. Same with ADO/JET connection. Create ODBC connection to same nwind.mdb file, Shows all records. The ODBC driver recognize ProductID as Integer[Counter] and not PK. This happens with latest DEV300m99 version, too. I found it when checked issue 115384, on win7. (where I copied table with two records, shows only one in mdb connected file). @fdany in your tables which ID types shows in OOo table edit mode with different drivers.
Changed summary.
ID types ADO ODBC texte [nchar] texte [varchar] texte (fixe) [text] texte (fixe) [char] SQL Null [] Memo [Text] Date/Heure [DateTime] Date/Heure [SmallDateTime] The values with ODBC are the right ones. With ODBC, the types as defined in SQLServer are mentionned. With ADO, it's not the case
But type differencies are the same in OO 4.2.1
Create new Access mdb connection to mdb file attached to issue 115384, http://www.openoffice.org/nonav/issues/showattachment.cgi/72843/testbit.mdb Open Table1 in OOo 3.2.1 the table shows 2 records. Open Table1 in OOo 3.3 or later including DEV300m99 the table shows 1 records. The record ID=1 record is missing. Create ADO or ODBC connection, 2 records in all OOo version.
Fixed in cws dba34d
Please verify. Thanks. See http://openoffice.org/bugzilla/show_bug.cgi?id=116509#c13 for reproduce.
Same problem with dev300m103, not fixed
Set back to fixed, because cws dba34d not integrated into DEV300m103. Please check when it is integrated into DEV300.
verified in cws dba34d
fixed in DEV300m105 Thanks
Checked in DEV300m105, OK.