问题描述
大家好
我正在尝试从VB.Net(使用ado.net)打开SQL Server数据库文件.只要没有运行SQL Server管理工作室,我就可以做到这一点.如果它至少运行了一次(即使我关闭了它),我也会收到以下消息:
Message =无法打开用户默认数据库.登录失败.用户"DIMITRIS \ Dimitris-PC"的登录失败."
编号= 4064
可以帮忙吗?
在此先感谢
Hi everybody
I am trying to open a SQL Server database file from VB.Net (using ado.net). I have no problem doing that as long as the SQL Server management studio is not running. If it has run at least once (even if i close it) i get the following message :
Message="Cannot open user default database. Login failed. Login failed for user ''DIMITRIS\Dimitris-PC''."
Number=4064
Can anybodt help?
Thanks in advance
推荐答案
Message =无法打开用户默认数据库.登录失败.用户"DIMITRIS \ Dimitris-PC"的登录失败.编号= 4064
Message="Cannot open user default database. Login failed. Login failed for user ''DIMITRIS\Dimitris-PC''."
Number=4064
更改用户的默认数据库,我认为这是问题所在.
Change the default database for the user, I assume that is where the problem lies.
这篇关于从VB.NET访问SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!