I searched through all the sites and could not find a solution.
I have a project in VBA that brings data from SQL sql. The field I need to bring is a varchar type, so the variable in my project is of the string type. If I execute the query in managment it throws me: "01661" and in my project it is displayed as "1661". I need zero. Tips?
this is the query in the VBA project:
select TOP 1 CodProdAsoc from soft.tkit where CodProd = 'K0119CM'
CStr(rs.Fields.item(0))