Hi,

How do I connect to a SQL Server Database using Windows Authentication. I am using VB.Net and SQLServer. My project is an ASP Web Application.

I am trying to use the following connection string:

Public xConnection As New OleDb.OleDbConnection("Provider=sqloledb;server=myserver;Trusted_Connection=yes;Integrated Security=sspi;database=mydbase")
xConnection.Open

But I get the following error:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

I have tried other connection strings but i either get the above error or Login failed for user ASPNET????? The user ASPNET has permissions to my database.

I can get into my database using Windows Authentication through Query Analyzer

If i put in a valid username and password it connects but i would rather use windows authentication.

Thanks for any help.
Michelle