6648 dblib fix

Explicit typecast to make freetds work smoothly with SQL Server 2014.