SQL Connection/Security problem

J

John

Hi

I am trying to connect to SQL on my local machine using;
myConnection = New OleDbConnection("Provider=sqloledb;Data
Source=MYSERVER;Initial Catalog=Events;User Id=MYSERVER\ASPNET;Password=;")

This gives me error; 'System.Data.OleDb.OleDbException: Login failed for
user 'MYSERVER\ASPNET'. The user is not associated with a trusted SQL Server
connection.

What is the problem and how can I fix it?

Thanks

Regards
 
P

Peter Rilling

Is the ASPNET account registered with SqlServer at both the server and
database levels?
 
R

Richard Thayne

Hello John,

I would suggest using the native .Net SQL Server data provider. Unless you
have a specific reason to use something else.
 
J

John

Thanks. I have now changed the code to;
myConnection = New SqlConnection("Data
Source=IV-SERVER-02;Database=Events;User
Id=eventsuser;Password=eventsuser;"). I am still getting the same error;
System.Data.SqlClient.SqlException: Login failed for user 'eventsuser'. The
user is not associated with a trusted SQL Server connection.

Any ideas?

Regards
 
M

Marina

Do these credentials work from query analyzer? It sounds like a problem with
the user not configured on the SQL Server end.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,076
Latest member
OrderKetoBeez

Latest Threads

Top