Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection Failed: SQLstate : '28000' 1

Status
Not open for further replies.

niallo32

IS-IT--Management
Apr 29, 2004
404
IE
I have an Access 2000 database which connects to SQL Server 2000.

I want to give normal users access to this database, but when I run the query, it asks for a username & password. When I select 'trusted connection' or enter in their ERP login, it returns the following error:

Connection failed: SQLState: '28000'. SQL Server error : 18456 - login failed for user Domainname\username

When I go to SQL Enterprise Mgr/Properties/Security/Authentication = SQL Server & Windows

How can I create a user in SQL that can connect and that does not give away my SQL admin password?

Clients connecting are on a Windows 2000 Terminal Server SP4

Thanks
 
First, every user has to have a SQL Server login. It doesn't matter if the login uses Windows Authetication or SQL Server Authentication, they still need a login.

Easiest way, open Enterprise Manager, expand until you see Security. Expand that and click on Logins. They need to have a login here. If there isn't one, right click on Logins and select New Login. Create the login and give them access to the proper database. Also, give them the proper authentication.

-SQLBill

Posting advice: FAQ481-4875
 
When I run the query, the connection screen to the SQL database defaults to the username of an Administrator user.

Can I change this somehow to always default to the user that I have created in SQL Server logins?

Thanks
 
How do you run the query? Is it from Access itself or from a shortcut?

I think that any query run from Access itself will have the admin, since that's who created the ODBC link initially. If you save the query as a shortcut or with some other name (after you have run it and used your login information), then it will have your information next time.

-SQLBill

Posting advice: FAQ481-4875
 
The Access DB has a shortcut on the Desktop, when you click on the shortcut a Macro forces a form to popup asking you to enter an Item no. The Items in the DB are invisible to those who use it, as I dont wish them to have anymore access and the tables in the query are linked to an ERP system.

The DB resides on a Network share. I copied it locally and it still defaults to the same 'Admin' authentication details even when I successfully authenticate using the user I created.

When I copied it locally, I get the following error:

Connection Failed:
SQLState: '01000'
SQL Server Error: 86
[Microsoft][ODBC SQL Server Driver][Named Pipes]ConnectionOpen (CreateFile()).
Connection Failed:
SQLState: '08001'
SQL Server Error: 86
[Microsoft][ODBC SQL Server Driver]Client unable to establish a connection

Thanks
 
You copied WHAT locally? The database or the form?

I think you want to open the form that is on your desktop. Run it with your login information. When it returns it's results, save it with a new name like "myForm", or "SQLBillsForm". Save it to a local file and then make a shortcut for your desktop. That's how we do it here.

-SQLBill

Posting advice: FAQ481-4875
 
Was a trusted connection (windows authentication) used when the sql server tables were initially linked? It is usually easiest in an Access front end to set up a DSN LESS connection so that odbc does not need to be set up for each user - one time in the app.

See Carl Prothman site for connections.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top