As the previous poster stated, I don't believe there is any default support for connectivity from Sun's C++ compiler to SQL Server. There is a product called
SQLAPI++ that seems to try to fill that gap. I have no experience using it, but given that fact that evaluation is free and the product itself is only $299, it is worth a look.
Cheers,
Keith