1. VB6/ADO/SQL Server 6.5 problem with DISTINCT?
I a VB 6 app I am writing, I use the following code:
SELECT DISTINCT
DW_Employees_V.EmployeeName , GEN_SystemEngineers.EmployeeNumber
FROM
GEN_SystemEngineers INNER JOIN DW_Employees_V ON
DW_Employees_V.EmployeeNumber = GEN_SystemEngineers.EmployeeNumber
WHERE
GEN_SystemEngineers.PlantID = '0780' and
GEN_SystemEngineers.AssetCode = '0781'
Using the query tool, this works fine, thank you very much (one name,
one empID, sorted by name) (Also works the same in Access ;-) )
But, as soon as I include the code in my VB app,:
1) the DISTINCT keyword is ignored, and
2) the results are not sorted by name.
Any ideas why this is happening? I'm not sure how to verify what
version of ADO (although I'm pretty sure it's 2.x), etc., I have
running on the server.
MANY thanks to all responders.
Sent via Deja.com http://www.deja.com/
Before you buy.
2. sp results held in variable
3. VB6: Data Environment & SQL Server 6.5
4. Java programs and source codes
5. Paged Recordsets, ADO & Sql-Server 6.5
6. Looking for Systems Architect position - Connecticut Area
7. migrating sql databases sever 6.5 from sql server 6.5 to another sql server 6.5
8. w2k+sql7+fopro2.6dos
9. VB6.0 & SQL 6.5
10. Problem usind ADO VB6 x SQL 6.5
11. vb6 ado sql 6.5 trusted connect fails
12. sql 6.5 ado using vb6 trusted connection failure
13. ado vb6 sql 6.5 trusted connect failure