我是这么写的:
_ConnectionPtr m_pConnection;
hr=m_pConnection->Open(
L"Provider=SQL Native Client; //diver
Data Source=StudyDB1.mdb", //DatabaseName
"","",adModeUnknown);
望大家指教
m_pConnection->Open(
"driver={SQL Server};Server=127.0.0.1;DATABASE=StudyDB1;UID=sa;PWD=xxx",
"","",adModeUnknown);