ADODB SQL Server connection not working only in IE9

本秂侑毒 提交于 2019-12-25 02:59:26

问题


Got a bit of an odd problem.

This code works fine in every other browser, just not in IE9. Standard ADODB connection string being used:

Provider=sqloledb;Server=localhost\sqlexpress;Database=DB;uid=DBuser;password=DBPassword;MultipleActiveRecordSets=true;

Executed thus:

Dim dbGlobal
Set dbGlobal = Server.CreateObject("ADODB.Connection")
dbGlobal.Open sConnectionString

In every browser this works and the application then goes on to load, in IE9 I get the following error message back:

-2147467259: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.


回答1:


Well with the help of the following answer on SO (http://stackoverflow.com/a/260861/418151), I managed to get a work around. As per that answer I tried running IE as admin and now it connects fine to the SQL Server!

I can only assume that in the last week or two I've installed some Windows Update that has slightly altered the permissions of SQL Server and/or IE9.

Still got no idea why exactly I now have to run IE as admin in order to connect to SQL Server!?



来源:https://stackoverflow.com/questions/12463504/adodb-sql-server-connection-not-working-only-in-ie9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!