// 读取配置文件,获得链接数据库字符
CString Provi= _T("");
CString Security= _T("");
CString Persist= _T("");
CString Catalog= _T("");
CString Source= _T("");
::GetPrivateProfileString("Server","Provider","",
Provi.GetBuffer(MAX_PATH), MAX_PATH,".\\databaselink.ini");
Provi.ReleaseBuffer();
::GetPrivateProfileString("Server","Integrated Security","",
Security.GetBuffer(MAX_PATH), MAX_PATH,".\\databaselink.ini");
Security.ReleaseBuffer();
::GetPrivateProfileString("Server","Persist Security Info","",
Persist.GetBuffer(MAX_PATH), MAX_PATH,".\\databaselink.ini");
Persist.ReleaseBuffer();
::GetPrivateProfileString("Server","Initial Catalog","",
Catalog.GetBuffer(MAX_PATH), MAX_PATH,".\\databaselink.ini");
Catalog.ReleaseBuffer();
::GetPrivateProfileString("Server","Data Source","",
Source.GetBuffer(MAX_PATH), MAX_PATH,".\\databaselink.ini");
Source.ReleaseBuffer();
CString strConnectTmp="Provider="+Provi+";Integrated Security="+Security+";Persist Security Info="+Persist+";Initial Catalog="+Catalog+";Data Source="+Source;
Provider=SQLOLEDB.1
Integrated Security=SSPI
Persist Security Info=False
Initial Catalog=bookbase
Data Source=PETE-PC
[/Server]