I have a problem with an Accessclient for which I am migrating the backend to SQL-server. The database contains contact-data amongst other, in particular a table "contacts" (relaties) and a table "contact_adresses" (relatie_adressen) in which for a contact multiple adresses are stored
I have this view in SQL-server:
A simple left join to display all contacts and all adresses for all contacts if they exist.
The view when opened in SSMS displays
1 Jan StreetX
1 Jan PostboxY
2 Piet null
When I link the view to Access the linked view displays
1 Jan StreetX
1 Jan StreetX
2 Piet null
How is it possible that Access displays different results than the view on SQL-server retrieves (and sends to Access...)??
Of course, when I create the same query in the Accessclient on linked tables I get the same result as SSMS, but then it becomes extremely slow (100x slower) on the dataset (>100.000 contacts) so that is not an option.
Goal of migrating to SQL was to speed up the client.
The view (and separate tables) are connected via 32-bit ODBC (SQL Server Native Client 11 driver), and the problem is the same on my laptop (SQL2008r2, Access2013) as on the production/testenvironment (SQL2012, Access 2010)
Code:
relatieID naam
1 Jan
2 Piet
AdresID RelatieID AdresType
1 1 StreetX
2 1 PostboxY
I have this view in SQL-server:
Code:
SELECT RelatieID, Naam, AdresType FROM relaties
LEFT OUTER JOIN relatie_adressen on relaties.relatieID = relatie_adressen.relatieID
The view when opened in SSMS displays
1 Jan StreetX
1 Jan PostboxY
2 Piet null
When I link the view to Access the linked view displays
1 Jan StreetX
1 Jan StreetX
2 Piet null
How is it possible that Access displays different results than the view on SQL-server retrieves (and sends to Access...)??
Of course, when I create the same query in the Accessclient on linked tables I get the same result as SSMS, but then it becomes extremely slow (100x slower) on the dataset (>100.000 contacts) so that is not an option.
Goal of migrating to SQL was to speed up the client.
The view (and separate tables) are connected via 32-bit ODBC (SQL Server Native Client 11 driver), and the problem is the same on my laptop (SQL2008r2, Access2013) as on the production/testenvironment (SQL2012, Access 2010)
Last edited: