深圳升蓝软件
数据库开发 .Net技术  |  ASP技术 PHP技术 JSP技术 应用技术类   
Hiblue Software

asp.net中用sqlclient访问数据库出错解决办法


March 25,2004
asp.net中用sqlclient访问数据库出错
错误现象:login failed for user:poleaspnet
解决办法:在命令行运行如下命令
osql -E -S (local)NetSDK -Q "sp_grantlogin 'POLEASPNET'"

osql -E -S (local)NetSDK -d Pubs -Q "sp_grantdbaccess 'POLEASPNET'"
osql -E -S (local)NetSDK -d Pubs -Q "sp_addrolemember 'db_owner', 'POLEASPNET'"
以上是对数据库Pubs授予POLEASPNET用户访问权
Copyright © 2001-2008 Shenzhen Hiblue Software Team All rights reserved