Hi. Is there a way in order to get the Server name using MSSQL ODBC in Visual C++? Here's my code:
CString wstr_connect ;
wstr_connect.Format( "DSN=%s;UID=%s;PWD=%s", gstr_DBName, gstr_UserID, gstr_Password ) ;
CDatabase mydb ;
BOOL ret = mydb.OpenEx( wstr_connect, CDatabase::noOdbcDialog ) ;
CString info = mydb.GetConnect( ) ;
GetConnect only returns the database name, user ID, password and WSID. How do i get the server name?
Thanks in advance!
CString wstr_connect ;
wstr_connect.Format( "DSN=%s;UID=%s;PWD=%s", gstr_DBName, gstr_UserID, gstr_Password ) ;
CDatabase mydb ;
BOOL ret = mydb.OpenEx( wstr_connect, CDatabase::noOdbcDialog ) ;
CString info = mydb.GetConnect( ) ;
GetConnect only returns the database name, user ID, password and WSID. How do i get the server name?
Thanks in advance!