pConn->Open("Provider=sqloledb;Data Source=Server1;"
"Initial Catalog=test1;User Id=sa;Password=sa;",
"", "", adConnectUnspecified);
server1 为机器名
test1为数据库名
"Initial Catalog=test1;User Id=sa;Password=sa;",
"", "", adConnectUnspecified);
server1 为机器名
test1为数据库名
我自己在试试吧