asp.net中用sqlclient访问数据库出错处理方法
发表时间:2024-06-14 来源:明辉站整理相关软件相关文章人气:
[摘要]asp.net中用sqlclient访问数据库出错错误现象:login failed for user:pole\aspnet解决办法:在命令行运行如下命令osql -E -S (local)\NetSDK -Q "sp_grantlogin 'POLE\ASPNET'&...
asp.net中用sqlclient访问数据库出错错误现象:login failed for user:pole\aspnet解决办法:在命令行运行如下命令osql -E -S (local)\NetSDK -Q "sp_grantlogin 'POLE\ASPNET'"osql -E -S (local)\NetSDK -d Pubs -Q "sp_grantdbaccess 'POLE\ASPNET'"osql -E -S (local)\NetSDK -d Pubs -Q "sp_addrolemember 'db_owner', 'POLE\ASPNET'"以上是对数据库Pubs授予POLE\ASPNET用户访问权