954,224 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Log In Failure

I am building my 1st .asp application and filling a data grid from a Nothwind DB. When I try to open the connection it gives me user log in error. Can anyone guide me here ?? Thank you.

Exception Details: System.Data.OleDb.OleDbException: Login failed for user 'WITHEATH\ASPNET'

Line 44: myConnection.Open()

Here is my code snippet:

VB:
--------------------------------------------------------------------------------
Public myConnString As String = "Provider=SQLOLEDB;Data
Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;"

Public myConnection As New System.Data.oledb.OleDbConnection(myConnString)

myConnection.Open()

mySelectCommand.CommandText = "SELECT * from users"
mySelectCommand.Connection = myConnection
myAdapter.SelectCommand = mySelectCommand
myAdapter.Fill(myDataSet, "users_table")

If Not (IsPostBack) Then
DataGrid1.DataBind()
End If

snufse
Newbie Poster
8 posts since Jul 2004
Reputation Points: 10
Solved Threads: 0
 

You need to add a username and password to your connection string ;). Either that, or add the user [MachineName]\ASPNET to your SQL Database Security.

Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You