Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2006
    Posts
    6

    Unanswered: connecting to sql server

    Dear Sirs,
    I am working on my first sql server web application. I have read many documents and I have gone to many forums, but i have'nt found any answer. Can you help me please.
    Here is my problem:
    I can't connect to my database. I use windows authentication and i log in as administrator. I have installed home edition of sql server and IIS is installed in my computer. I use this scripts:

    <%
    dim objCon
    set objCon = server.CreateObject("ADODB.Connection")
    objCon.ConnectionString="DSN=dbna.dsn;uid=sa;pwd=; database=na2"
    objCon.open
    %>

    Where dbna.dsn have been defined in "Data Sources (ODBC)" part of control panel.
    When I open the my webpage i receive this error:

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
    [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'ALADDIN\IUSR_ALADDIN'.
    /dbconnect.asp, line 5

    My computer name is ALADDIN and my username is Omid.
    Best regards,
    Omid.

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    SQL thinks that you are trying to connect using windows authentication. Check the settings on your DSN entry.

    As an aside, I would avoid using a DSN entry if you can. Instead, use MS OLE DB for SQL Server.

    Check out this web site for some good examples: www.connectionstrings.com.

    Regards,

    hmscott
    Have you hugged your backup today?

  3. #3
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  4. #4
    Join Date
    Jan 2006
    Posts
    6
    Thanks alot for your helps but I can't connect to my database yet. I tried OLE DB too but I received the same error. I think something is wrong in my sql server. Can you tell me please what are the main steps for preparing a sql server database.
    Regards,
    Omid.

  5. #5
    Join Date
    Jan 2006
    Posts
    6

    I can't connect to my database yet

    Quote Originally Posted by loquin
    Thanks alot for your helps but I can't connect to my database yet. I tried OLE DB too but I received the same error. I think something is wrong in my sql server. Can you tell me please what are the main steps for preparing a sql server database.
    Regards,
    Omid.

  6. #6
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Change SQL authentication mode to MIXED if you are trying to log on with sa/pwd mode.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  7. #7
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Change SQL authentication mode to MIXED if you are trying to log on with sa/pwd.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  8. #8
    Join Date
    Jan 2006
    Posts
    6

    I don't want to log on with sa/pwd

    I don't want to log on with sa/pwd. I want to use windows authentication.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •