943,641 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 4091
  • ASP.NET RSS
Jul 27th, 2004
0

Log In Failure

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
snufse is offline Offline
8 posts
since Jul 2004
Aug 2nd, 2004
0

Re: Log In Failure

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.
Moderator
Reputation Points: 322
Solved Threads: 28
The C# Man, Myth, Legend
Tekmaven is offline Offline
914 posts
since Feb 2002

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Regarding ListItem Class
Next Thread in ASP.NET Forum Timeline: A good example of Master/Detail INPUT webform





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC