1、首先看下数据库的连接:连接字符串
'连接字符串'
1、"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=;PassWord=;Initial Catalog=;Data Source="
2、sCon= "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Lable;Data Source=.\WINCC"
3、'strCon= "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;password=20140226;Initial Catalog=WINCC;Data Source=.\WINCC"
4、strCon= "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=WINCC;Data Source=.\WINCC"
5、strCon= "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=WINCC;Data Source=.\WINCC"
Provider=SQLOLEDB.1 ------打开数据库用oledb的方式连接 Persist Security Info ----是否保存安全信息 User ID
|