Results 1 to 5 of 5

Thread: pROBLEMS lOGGING tO dATABASE

  1. #1

    Thread Starter
    Registered User
    Join Date
    Jun 2004
    Posts
    12

    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??

  2. #2
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    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

  3. #3
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    You also might want to check if caps lock is on

  4. #4

    Thread Starter
    Registered User
    Join Date
    Jun 2004
    Posts
    12
    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.

  5. #5
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    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
  •  



Click Here to Expand Forum to Full Width