ADO return varchar string with space trimmed



I have a stored procedure like this:
select CASE WHEN LEN(D1) < = 10
THEN D1 + REPLICATE(' ', 10 - len(D1))
ELSE LEFT(D1,10)
END AS D1
from table1

When ADO retrieved the record in VB, the appended spaces were trimmed! I can
work around with REPLICATE(N' ', 10 - len(D1)). But what's wrong?
.