测试连接失败,因为初始化提供程序SQL Server 2008中存在错误 [英] test connection failed because of an error in initializing provider sql server 2008

查看:1169
本文介绍了测试连接失败,因为初始化提供程序SQL Server 2008中存在错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人

Iam是SQL Server的新手,我只是想将使用Acess数据库完成的应用程序转换为SQL Server数据库
由于Visual Studio中已经存在SQL Server 2008,因此我已经创建了基于服务的数据库,但是当我尝试使用oledbdataconnection进行连接时,Iam收到如下错误消息(在测试连接处)



由于初始化提供程序时发生错误,测试连接失败.
无法打开物理文件"D:\ WindowsFormsApplication3 \ WindowsFormsApplication3 \ masterdatabase.mdf"
操作系统错误5:5(访问被拒绝)",

我不知道它是我的安全设置还是其他问题,但是我尝试了许多有关防火墙的技巧来解决此问题

我的是msqlserver位于本地并且正在运行.

有人可以建议我一些解决此问题的想法吗?

解决方案

听起来您正在尝试使用的数据库文件存在安全问题.

或者,尝试创建一个示例Windows应用程序,然后将OleDbConnection拖放到WinForm上,根据向导,您应该获得正确的连接,并将其复制并粘贴到您的app.config或web.config中. blockquote>

Dear all

Iam new to sql server and I was just trying to convert an application done with acess database to SQL server database
Since SQL server 2008 is already present in the visual studio I had created a service based database but when i try to connect this using oledbdataconnection Iam getiing a error message as below(at test connection)



Test connection failed because of an error in intializing provider.
Unable to open the physicalfile "D:\WindowsFormsApplication3\WindowsFormsApplication3\masterdatabase.mdf"
Operation system error 5 : 5"(Access is denied)",

I don''t know whether its problem with my security setting or some thing else but i had tried many tips on firewall to solve this

mine is msqlserver located localy and its running .

can anyone pls suggest me some idea to solve this

解决方案

It sounds like that the database file you''re trying to use, has security issues to access.

As an alternative, try to create a sample Windows Application and drag and drop an OleDbConnection onto the WinForm,according to the wizard,you should get a correct conn str,copy and paste it into your app.config or web.config。


这篇关于测试连接失败,因为初始化提供程序SQL Server 2008中存在错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆