Whenever I try to connect to the database I get the error message :
Login failed for user 'DELL\ASPNET'.
What is this ASPNET?
How do i set it up?
Where, What, How HELP????
Printable View
Whenever I try to connect to the database I get the error message :
Login failed for user 'DELL\ASPNET'.
What is this ASPNET?
How do i set it up?
Where, What, How HELP????
what's the code you're tryin to use to connect to the database?
Heres the code i use:
Dim objConnection As New SqlClient.SqlConnection("server=.;database=dbCustomers;trusted_connection=true")
Dim objCommand As New SqlClient.SqlCommand("Select * from tblCustomers", objConnection)
Dim objReader As SqlClient.SqlDataReader
'Open database connection
objConnection.Open()
'Get the result into the datareader object
objReader = objCommand.ExecuteReader
'Bind
grdMembers.DataSource = objReader
grdMembers.DataBind()
You've got "trusted_connection=true", i'm thinkin the prob has to do with the fact that that YOU are not connecting to SQL Server, the ASPNET account is(the one your web page runs under), and if that account is not trusted(and it shouldn't be by default) you're not going to connect. How bout settin up a SQL Server account, removing trusted connection and adding in user id and password? OR grant the ASPNET account access to sql server(i wouldn't do that though!)
Ya, so i used trusted_connection = true on my local machine(DeathAngel) and removed the "guest" account from my pubs database, tried to connect and got this:
Quote:
Cannot open database requested in login 'pubs'. Login fails. Login failed for user 'DEATHANGEL\ASPNET'.