December 23, 2007 at 1:45 am
[font="Comic Sans MS"]i tried to change my connection string and i thought it was a problem with connection string,i tried DNS, OLE DB,connections, but they didnt work:ermm:and the most error that IE shows is about server loggin failed!::sick:.("Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][SQL Native Client][SQL Server]Login failed for user ',...") i connect to sql server with windows authentication.i tried to make a password and user name for sql server and use it in connection string,but i couldnt change them.what's the problem with it?:crazy: PLZ tell me exactly what shoul i do.:) [/font]
December 23, 2007 at 9:22 am
It is much easier to create a user in SQL for this specific task. Use SQL Authentication. Trying to use Windows Auth in a web environment is difficult. I am not saying that it is impossible. You do not give each use in your Active Directory permissions to the database. Your work would never end on assigning and denying access. You create only a single user, and use that for all communication between the front-end and database.
I create a simple use and give it no permissions to do anything. I then create the sprocs that I am using, and then give my webuser only exec permissions to those sprocs.
Andrew SQLDBA
December 23, 2007 at 9:23 am
Can you connect with a Data Source from the client computer?
December 23, 2007 at 9:35 am
Why would you ever want to use an old ODBC connection to communicate with a modern day OLEDB / ADO database? You should never use ODBC to connect to SQL
Talk about going back in time to the days of the telegraph.
Andrew SQLDBA
December 23, 2007 at 11:47 am
[font="Comic Sans MS"]thnx alot dear Andrew SQLDBA.
actually i tried to use sql authentication and make a user by givin it username and password,but it doesn't accept it an gives me another error,would you plz tell me, step by step ,how can i make a user in sql server 2005?:)
and i should say that i never try to use ODBC connection,i insert OLE DB connection string in my asp code but i dont know how it use ODBC driver,like it says in IE's error!actually i dont know what happend!!:D can you help me to correct this?[/font]
January 30, 2008 at 11:37 am
To make a user:
in Mgmt Studio, expand Security and right-click on Logins.
Select 'new login'
Enter a login name
Select 'SQL Server authentication' and enter the password twice
Move to the 'User Mapping' page (top left of new login screen)
Select database from list and, in bottom pane, click on db_datareader to allow user to read the database contents, and click on db_datawriter if the user needs update rights
Click on okay and the SQL user is created.
In your asp, you can use a connection string like:
ConnectionString = "PROVIDER=SQLOLEDB;DATA SOURCE=servername;INITIAL CATALOG=databasename;USER ID=the user id you just created;PASSWORD=password"
Hope this helps!
Laura
April 25, 2008 at 2:51 pm
Help! Newbie here.
I have SQL enterprize mgr 8.0 running and am using IIS 5.1.
Keep getting the following with an ASP page that brings back employee information. I have mixed mode selected in SQL, and IUSR_xx anomymous user in IIS.
What am I doing wrong? Thank you for your help.
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
April 28, 2008 at 4:32 am
AndrewSQLDBA (12/23/2007)
You should never use ODBC to connect to SQLAndrew SQLDBA
Why is that? You havn't given a valid reason for saying this.
April 28, 2008 at 9:27 am
You need to check your connection string. Your application (asp page) is trying to access the sql server with Null as the login - "Login failed for user '(null)'". Your login name needs to be included in your connection string.
April 28, 2008 at 4:06 pm
Because you should always use an ADO connection when using ASP.NET. Or you should use OLEDB connection when using classic ASP.
ODBC is old, slow, and has plenty of security risks, and is a very poor way of making a connection to a fast database.
Andrew SQLDBA
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply