Re: connecting to sql server from asp page
From: Bern Taylor (thebg_at_btinternet.com)
Date: 04/18/04
- Next message: Bern Taylor: "Re: PacketSize"
- Previous message: Paul Ibison: "Re: connecting to sql server from asp page"
- In reply to: Ronny Jones: "connecting to sql server from asp page"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 18 Apr 2004 13:26:45 +0100
In your DSN, if you include the login and password, then you are specifying
that the dsn should not use integrated authentication. However, the login
name and password in the login request from a DB-Library or Open Database
Connectivity (ODBC) client application are always ignored by SQL Server
(149398).
You have two choices - either supply the uid and pwd in the connection open
(as per Paul) or switch to integrated security and allocate IUSR_xxxx
appropriate permissions.
Bern
"Ronny Jones" <anonymous@discussions.microsoft.com> wrote in message
news:5B207EDD-6761-48CF-A924-0E3CA4756C94@microsoft.com...
> Hi,
>
> I'm trying to establish a connection to Sql Server from an asp page using
a System DSN.
> I setup the System DSN to use Sql Server authentication; the userid and
password
> were stored with the ODBC configuration utility. Sql Server is configured
to used both Windows and Sql Server authentication.
>
> I was not able to connect using the DSN from an asp page - the exception
was as follows
>
> Message "ERROR [28000] [Microsoft][ODBC SQL Server Driver][SQL
Server]Login
> failed for user '(null)'. Reason: Not associated with a trusted SQL Server
> connection.
> ERROR [28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed
> for user '(null)'. Reason: Not associated with a trusted SQL Server
> connection.
>
> The code snippet:
>
> Dim connString As String = "DSN=myDSN;"
> Dim conn As OdbcConnection = New OdbcConnection(connString)
> Try
> conn.Open()
> Catch ex As Exception
> End Try
>
> Any help or article would be appreciated.
- Next message: Bern Taylor: "Re: PacketSize"
- Previous message: Paul Ibison: "Re: connecting to sql server from asp page"
- In reply to: Ronny Jones: "connecting to sql server from asp page"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|