主题:m_pConnection->Open()函数参数问题
_ConnectionPtr m_pConnection
版本1:
m_pConnection->Open("Data Source=adotest;UID=sa;PWD=;","","",adModeUnknown);
版本2:
m_pConnection->Open("driver={SQL Server};Server=127.0.0.1;DATABASE=vckbase;UID=sa;PWD=139","","",adModeUnknown);
版本3:
m_pConnection->Open("Data Source=adotest;","","",adModeUnknown);
我想请问在使用数据源连接数据库时,m_pConnection->Open函数的第一个参数里是不是只要有"Data Source=数据源名",这句就可以了?
版本1:
m_pConnection->Open("Data Source=adotest;UID=sa;PWD=;","","",adModeUnknown);
版本2:
m_pConnection->Open("driver={SQL Server};Server=127.0.0.1;DATABASE=vckbase;UID=sa;PWD=139","","",adModeUnknown);
版本3:
m_pConnection->Open("Data Source=adotest;","","",adModeUnknown);
我想请问在使用数据源连接数据库时,m_pConnection->Open函数的第一个参数里是不是只要有"Data Source=数据源名",这句就可以了?