|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ASP Database Connection
I'm trying to create a connection to an MS SQL database from ASP. I'm trying to make this connection without using DSN, but the majority of the examples I have found on the net use DSN. I'm not sure if what I have here makes sense (if it includes code used for DSN connections or not).
strconn="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=;Data Source=;" mySQL="select field_name from table_name" set conntemp=server.createobject("adodb.connection") conntemp.open strconn set rstemp=conntemp.execute(mySQL) *Note and are replaced by my actual db and server names. I am trying to use Windows integrated security to log onto the server, as opposed to providing a username 'n password. However, the error I keep getting is: Error Type: Microsoft OLE DB Provider for SQL Server (0x80040E4D) Login failed for user '\'. Any ideas? |
|
#2
|
|||
|
|||
|
It would appear that the page is trying to access the DB as anonymous user.
Try forcing the user to authenticate on that particular page. You may also need to look at the permissions on the DB itself. HTH.
__________________
How can I soar like an eagle when I'm flying with turkey's? |
|
#3
|
|||
|
|||
|
I am trying to log in using Windows Integrated Security so that when the user logs in, it will use thier Windows login information and then a security token will be transferred to the DB. This is why I set "Integrated Security=SSPI" in my connection string.
But the weird thing is that the error I get is "Login failed for user '\', which makes it seem like it is trying to log in anonymously. Is there something I am doing wrong with this Windows login feature? |
|
#4
|
|||
|
|||
|
Take a look at this
Take a look at URL They have several different configurations for connections.
Sparky |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > ASP Database Connection |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|