连接达梦数据库失败?代码如下,返回的 DataSource 为空
UGDsConnection *connection = new UGDsConnection;
connection->m_nType = UGint(UGEngineType::DMPlus);
connection->m_strAlias = _T("dameng");
connection->m_strServer = _T("192.168.1.126");
connection->m_strUser = _T("SUPERMAP");
connection->m_strPassword = _T("dameng888");
connection->m_strDatabase = _T("");
UGDataSource* pDataSource = NULL;
UGWorkspace *pUGWorkspace = new UGWorkspace;
if(pUGWorkspace==NULL)
{
AfxMessageBox(L"pUGWorkspace false");
}
pDataSource = pUGWorkspace->OpenDataSource(*connection);
if(pDataSource==NULL)
{
AfxMessageBox(L"pDataSource false");
}