That would be FreeTDS [1] with D bindings [2]. Unless Microsoft have headers available for interfacing with SQL Server.
You can use ODBC if it is a Windows program. If you want to talk to SQL Server from a Linux program though, FreeTDS is what you'll want.