作为一个备忘,今天项目中要连接SQLSERVER但是原来用的字符串都有问题提示:
没有可用的错误消息,结果代码: DB_E_ERRORSOCCURRED(0x80040E21)。
解决方案:
Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;
Integrated Security=SSPI;
更多操作:
http://www.connectionstrings.com/sql-server#p20
http://www.connectionstrings.com/microsoft-ole-db-provider-for-sql-server-sqloledb/