void smsLogon::InitSQLServer(CString server, CString db, CString UserName, CString Pwd)
{
m_pConnection.CreateInstance("ADODB.Connection");
CString strCn;
strCn.Empty();
strCn="provider=SQLOLEDB;data source="+server
+";initial catalog="+db
+";userID="+UserName
+";PassWord="+Pwd;
_variant_t bcnstr=_variant_t(strCn);
_variant_t bunstr=_variant_t(UserName);
_variant_t bpwdstr=_variant_t(Pwd);
//打开一个连接
try