Log In Failure

Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Jul 2004
Posts: 8
Reputation: snufse is an unknown quantity at this point 
Solved Threads: 0
snufse snufse is offline Offline
Newbie Poster

Log In Failure

 
0
  #1
Jul 27th, 2004
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 898
Reputation: Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light 
Solved Threads: 26
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend

Re: Log In Failure

 
0
  #2
Aug 2nd, 2004
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.
-Ryan Hoffman

.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC