asp.net中用sqlclient訪問(wèn)數(shù)據(jù)庫(kù)出錯(cuò)處理方法
發(fā)表時(shí)間:2024-02-18 來(lái)源:明輝站整理相關(guān)軟件相關(guān)文章人氣:
[摘要]asp.net中用sqlclient訪問(wèn)數(shù)據(jù)庫(kù)出錯(cuò)錯(cuò)誤現(xiàn)象:login failed for user:pole\aspnet解決辦法:在命令行運(yùn)行如下命令osql -E -S (local)\NetSDK -Q "sp_grantlogin 'POLE\ASPNET'&...
asp.net中用sqlclient訪問(wèn)數(shù)據(jù)庫(kù)出錯(cuò)錯(cuò)誤現(xiàn)象:login failed for user:pole\aspnet解決辦法:在命令行運(yùn)行如下命令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'"以上是對(duì)數(shù)據(jù)庫(kù)Pubs授予POLE\ASPNET用戶訪問(wèn)權(quán)