Re: SQL connection
From: Steve Caliendo (scaliendo_at_epion.com)
Date: 03/11/04
- Next message: Jonathan Tower: "Re: ASP.NET pages inheriting from template class"
- Previous message: Steven K: "Add and insert values into a data bound Repeater"
- In reply to: Robert: "SQL connection"
- Next in thread: Robert: "Re: SQL connection"
- Reply: Robert: "Re: SQL connection"
- Reply: Robert: "Re: SQL connection"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 11 Mar 2004 10:27:50 -0500
Use this syntax:
Dim cn As New SqlClient.SqlConnection("Server=(local);Database=LSP;User
Id=yourname;Password=yourpw;Trusted_Connection=False;")
cn.open()
Then on you're SQL database, set up a user with the correct username and
password. The ASPNET user should then be able to access your database.
Steve
"Robert" <anonymous@discussions.microsoft.com> wrote in message
news:b02201c4076f$fb0687d0$a401280a@phx.gbl...
> Running ASP.NET 1.1 application on Windows XP Pro.
> Trying to connect to a SQL 2000 server as the annonymous
> user using a trusted connection.
>
> I keep getting:
> System.Data.SqlClient.SqlException: Login failed for
> user '(null)'. Reason: Not associated with a trusted SQL
> Server connection.
>
> The IUS_machinename login is a valid user in my SQL
> database.
>
> Does .NET use some other user authority to connect to a
> sql database?
- Next message: Jonathan Tower: "Re: ASP.NET pages inheriting from template class"
- Previous message: Steven K: "Add and insert values into a data bound Repeater"
- In reply to: Robert: "SQL connection"
- Next in thread: Robert: "Re: SQL connection"
- Reply: Robert: "Re: SQL connection"
- Reply: Robert: "Re: SQL connection"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|