HELP...Queries return different results in VB than Access 
Author Message
 HELP...Queries return different results in VB than Access

Hi,
    I created a query in Access:

SELECT -sum([Col1] Like "*Preferred*") AS [Preferred Only], -sum([Col1] Like
"*Material*") AS [Material Only], -sum([Col1] Like "*Both*") AS [Preferred
and Material], -sum([Col1] <>"*None*") AS [Total Preferred and/or Material]
FROM Table1;

In Access, I get these results:

Preferred Only        Material Only        Preferred and Material      Total
Preferred and/or Material
          1                            2                                 2
5             (These Are Correct)

BUT...When I use VB6 Data Envirnment Settings, it shows all the fields in
the heirarchy but I get these results:

Preferred Only        Material Only        Preferred and Material      Total
Preferred and/or Material
          0                            0                                 0
13 (The amount of records in Table1)
The settings in the command properties are correct as follows:
Name = Command1
Connection = Connection1
Database object = View
Object Name = Query1

Could sombady direct me in the right path?

Thank You
J



Sun, 01 Aug 2004 06:54:32 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Different query results in Access 2000 than in VB

2. Two identical queries returning different results

3. Quereies Return Different Results ADO vice Access

4. ??? Result of a Query into different Access 2.0 database

5. LIKE query gives different results in Access 2000 and VB6 SP5

6. Help: Query ran from VBA code return incorrect results

7. Different return values when using Query Analyzer and VB code

8. Access query works - same query in VB returns no records

9. Access query works - same query in VB returns no records

10. UBound returns different result when array is created using Split()

11. DAO/ADO return different results

12. DAO/ADO return different results

 

 
Powered by phpBB® Forum Software