We help IT Professionals succeed at work.

ADP login by default

monsieurx
monsieurx asked
on
Medium Priority
948 Views
Last Modified: 2012-05-05


I have a ADP project under MS access 2k as a front end of an SQL Server 2005 Backend. When I start my application, the login dialog box appear but the default username is the one that I used to create the application.

I would like to set the default login to the last username who succesfully log in (or something like that)

I know that I can change the login when I click on  File; Connexion. but in this case the new login become the default login.

Thanx
Comment
Watch Question

Leigh PurvisDatabase Developer
CERTIFIED EXPERT

Commented:
Could you not just distribute it without *any* login credentials set - and then the users go in from cold.

Author

Commented:
For sur it will be better than my login as default, but how can I set the default login to an empty value

I tried by file; connexion and it's imposible to let the login field empty because it give me an error that say something like "Impossible to connect to database"

thanx
Database Developer
CERTIFIED EXPERT
Commented:
If you remove the connection altogether - no login - no server no database.
Then set them all in code as your app starts up the first time.
(Just an normal ADO connection string - set that as the application's connection)

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Leigh PurvisDatabase Developer
CERTIFIED EXPERT

Commented:
By way of example

Dim strconn As String

strconn = "Provider=SQLOLEDB.1;Data Source=YourServer;User ID=UN;Password=PW;Initial Catalog=YourDatabase;"
CurrentProject.OpenConnection strconn
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.