ADO, SQL 6.5 and VarChar Fields 
Author Message
 ADO, SQL 6.5 and VarChar Fields

I need to know if anyone knows why the following is happening.

I am performing the following select on a table
     Select Distinct Field1 From TableA

      Field1 is defined of type VarChar

When run through SQL Enterprise Manager this query returns only a single
occurance of each value,
but when run through a ADO based connection it may return duplicates (IE:
"Value1" and "Value1    ")

In order for this to properly work through a ADO Records set I need to
perform the following select
    Select Distinct LTrim(RTrim(Field1)) From TableA

By definition of a VarChar type field the trailing spaces should not be
included, so why are they included in a ADO based recordset.

Any info on why this happends would be appreciated.


Sun, 18 Nov 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. ADO / SQL 6.5 / Text Fields

2. Space in Field Name,SQL 6.5 ADO

3. VB5/ADO/SQL 6.5 currency field update fails?

4. Max number of fields in an ADO/Sql 6.5 query

5. Project: Retrieving text fields from SQL Server 6.5

6. Text/Memo Fields in SQL 6.5

7. Loading Rich Text Box from SQL Server 6.5 Text Field

8. Delete a field in SQL Server 6.5

9. Image Fields - VB6, SQL 6.5

10. Headbang: Annoyed users, trailing spaces, SQL 6.5 field length, txt box, MaxLength

11. image fields in SQL Server 6.5, how to..?

12. Delete a field in SQL Server 6.5


Powered by phpBB® Forum Software