Help! Connection String
-
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!
-
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!
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.
-
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!
download it from http://himadrish.cjb.net Himadrish Laha