If i do a query (with 2 subqueries) on a .MDB database from Access 97, i get the right records.
If i do the same query from a VB6 program with a data bound control which accesses the MDB db through an ODBC data source (Microsoft Access Driver), i get the right records if the ODBC driver version is 3.51 (3.51.171300), while i don' t get any record if version is 4.0 (4.00.4202.00).
The query is:
If on a Windows system with ODBC driver version 4.0 i just replace ODBCJI32.DLL and ODBCJT32.DLL in \WINDOWS\SYSTEM with those of 3.51, the query works fine.
Other queries without subqueries work fine in 4.0.
How should i write this query for it to work in 4.0 too ?
If i do the same query from a VB6 program with a data bound control which accesses the MDB db through an ODBC data source (Microsoft Access Driver), i get the right records if the ODBC driver version is 3.51 (3.51.171300), while i don' t get any record if version is 4.0 (4.00.4202.00).
The query is:
Code:
------------
SELECT [Cognome],[Nome],[Data_Ingresso],[Categoria],Categoria.[Descrizione]
,[Data_Categoria],[Categoria_Precedente],Categoria_1.[Descrizione]
,[Data_Categoria_Prec],[Indirizzo],[Cap],[Citta]
,[Provincia],[Pref_casa],[Tel_casa]
,[Pref_ufficio],[Tel_ufficio],[Pref_cellulare],[Tel_cellulare],[Pref_fax],[Tel_fax]
,[E_mail],[Sesso],[Luogo_nascita],[Data_nascita],[Codice_fiscale]
,[Professione],[Armadietto],[Tipo_Barca],[Nome_barca],[Posto_barca]
,[Telecomando],[Data_inizio],[Data_fine],[Tipo_auto],[Targa_auto],[Importo_km]
,[Legami],[Note],[Canale],Canale.[Descrizione],[Pagare]
,[Data_Scadenza],[N_Mesi],[Id]
FROM Q_Socio1
WHERE Q_Socio1.[Id] IN (SELECT QuotaPagata.[Id_Socio]
FROM QuotaPagata
WHERE ((QuotaPagata.[Data]
BETWEEN #01/01/2002# AND #04/24/2002#)))
AND Q_Socio1.[Id] NOT IN (SELECT QuotaPagata.[Id_Socio]
FROM QuotaPagata
WHERE ((QuotaPagata.[Data]
BETWEEN #01/01/2001# AND #12/31/2001#)))
ORDER BY Q_Socio1.[Cognome]
------------
If on a Windows system with ODBC driver version 4.0 i just replace ODBCJI32.DLL and ODBCJT32.DLL in \WINDOWS\SYSTEM with those of 3.51, the query works fine.
Other queries without subqueries work fine in 4.0.
How should i write this query for it to work in 4.0 too ?