
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.
Thanks!