In the past, i create connection with sql server from Qt-C++, but the string connection, i found sometimes it changes, i use something like this:
QString string