Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Help! Connection String

Help! Connection String

Scheduled Pinned Locked Moved Web Development
databasehelpsql-servercomsysadmin
3 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CillyMe
    wrote on last edited by
    #1

    It's been awhile since I pressed the panic button. But I'm have trouble connecting to my SQL server from my classical ASP application. Here's the error: Microsoft OLE DB Provider for SQL Server error '80004005' Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. /SomeDevFolder/login.asp, line 69 If you print the connection string to screen: "Connection string: Provider=sqloledb; Data Source='XXX.XXX.XXX.XXX'; Initial Catalog='MyDatabase'; User ID='sa'; Password='secret'" 1. I want to emphasize that the ASP script works fine with one SQL server and not with another. 2. The SQL server I'm having trouble to connect to is the default instance. 3. Yes, I have checked and double checked: The SQL server is in "Mixed Mode" (authentication) - I have no idea what it has to do with trusted connection or not. I have supplied both username/password. What more do they want from me? 4. I used Query Analyzer to connect to the SQL server I'm having trouble with - using same connection string (user name and password) - it worked fine. I doubt if it's has to do with my ASP code since connection to another server works, but, here's the code anyway: oConn.ConnectionString = "Provider=sqloledb; Data Source='" & Application.Contents("sDbSource") & "'; Initial Catalog='" & Application.Contents("sDbInitialCatalog") & "'; User ID='" & Application.Contents("sDbUser") & "'; Password='" & Application.Contents("sDbPassword") & "'" oConn.Open Help!

    T P 2 Replies Last reply
    0
    • C CillyMe

      It's been awhile since I pressed the panic button. But I'm have trouble connecting to my SQL server from my classical ASP application. Here's the error: Microsoft OLE DB Provider for SQL Server error '80004005' Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. /SomeDevFolder/login.asp, line 69 If you print the connection string to screen: "Connection string: Provider=sqloledb; Data Source='XXX.XXX.XXX.XXX'; Initial Catalog='MyDatabase'; User ID='sa'; Password='secret'" 1. I want to emphasize that the ASP script works fine with one SQL server and not with another. 2. The SQL server I'm having trouble to connect to is the default instance. 3. Yes, I have checked and double checked: The SQL server is in "Mixed Mode" (authentication) - I have no idea what it has to do with trusted connection or not. I have supplied both username/password. What more do they want from me? 4. I used Query Analyzer to connect to the SQL server I'm having trouble with - using same connection string (user name and password) - it worked fine. I doubt if it's has to do with my ASP code since connection to another server works, but, here's the code anyway: oConn.ConnectionString = "Provider=sqloledb; Data Source='" & Application.Contents("sDbSource") & "'; Initial Catalog='" & Application.Contents("sDbInitialCatalog") & "'; User ID='" & Application.Contents("sDbUser") & "'; Password='" & Application.Contents("sDbPassword") & "'" oConn.Open Help!

      T Offline
      T Offline
      Terry ONolley
      wrote on last edited by
      #2

      Have you verified that your error isn't related to a permission problem at the IIS level (rather than the SQLServer level)? It sounds like your request isn't making it to the database.


      Have you answered an MTQ? Check out the stats!

      1 Reply Last reply
      0
      • C CillyMe

        It's been awhile since I pressed the panic button. But I'm have trouble connecting to my SQL server from my classical ASP application. Here's the error: Microsoft OLE DB Provider for SQL Server error '80004005' Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. /SomeDevFolder/login.asp, line 69 If you print the connection string to screen: "Connection string: Provider=sqloledb; Data Source='XXX.XXX.XXX.XXX'; Initial Catalog='MyDatabase'; User ID='sa'; Password='secret'" 1. I want to emphasize that the ASP script works fine with one SQL server and not with another. 2. The SQL server I'm having trouble to connect to is the default instance. 3. Yes, I have checked and double checked: The SQL server is in "Mixed Mode" (authentication) - I have no idea what it has to do with trusted connection or not. I have supplied both username/password. What more do they want from me? 4. I used Query Analyzer to connect to the SQL server I'm having trouble with - using same connection string (user name and password) - it worked fine. I doubt if it's has to do with my ASP code since connection to another server works, but, here's the code anyway: oConn.ConnectionString = "Provider=sqloledb; Data Source='" & Application.Contents("sDbSource") & "'; Initial Catalog='" & Application.Contents("sDbInitialCatalog") & "'; User ID='" & Application.Contents("sDbUser") & "'; Password='" & Application.Contents("sDbPassword") & "'" oConn.Open Help!

        P Offline
        P Offline
        Populate123
        wrote on last edited by
        #3

        download it from http://himadrish.cjb.net Himadrish Laha

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups