|
-
Jul 10th, 2004, 03:59 PM
#1
Thread Starter
Registered User
pROBLEMS lOGGING tO dATABASE
Hello everyone,
in my ASP .Net application I wrote the following code:
Code:
SqlDataAdapter1.Fill(DataSet1)
and I get the following error:
Code:
Login failed for user 'SILVERARROW\ASPNET'.
I tried to populate the dataadapter using the "Preview data" and it does work.
Also, the code does work when I use it from a windows-base application. So I believe it's a matter of privilages assigned to ASP Net account..
can any one help me fix this problem??
-
Jul 10th, 2004, 04:46 PM
#2
Frenzied Member
You need to give database permissions to the user 'SILVERARROW\ASPNET'. I assume you're using MSSQL 2000 because of the SqlDataAdapter.
Do you have the GUI tools? Specifically Enterprise Manager? You can set permissions easily in there. If you're using MSDE and you only have command line access, you have to do it through SQL statements.
Mike
-
Jul 10th, 2004, 06:26 PM
#3
Frenzied Member
You also might want to check if caps lock is on
-
Jul 10th, 2004, 06:31 PM
#4
Thread Starter
Registered User
thank you mike..
I do not know how to set privileges from entrprise manager but i solved the problem by changing the ASP.Net account from windows XP administrative tools>computer management
I know it's not a practical solution.. but at this stage of learning, it's okay.
-
Jul 10th, 2004, 06:36 PM
#5
Frenzied Member
Cool. This is really a DBA's job, but sometimes you're also the DBA. Any introduction type book to SQL Server, or, in Books On Line (BOL) - included in your SQL installation, or on MSDN, you can find lots of info about DB security and permissions, setting up users and groups etc.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|