none
Access 2007 Password RRS feed

  • Question

  • I have a solution that originally started out using a Access 2003 database and Studio 2005.  I upgraded to Access 2007 and Studio 2007 recently.

    Neither the 2003 or 2007 database have a password.  They are local to my machine.

    I deleted my datasource and added a new datasource pointing to my 2007 database.  When I run the report I am asked for a username and password.  No matter what I try I get a failure.

    I tried to re-link to my original database I still get the same error.

    Any help would be appreciated.
    Thursday, February 26, 2009 9:00 PM

Answers

  • If you display the Dataset in the Designer you should be able to change the connection string. What you need to do is right click on the Dataset in the Designer and select Configure from the menu. Click on the Previous button twice to display Data Connection dialog. From there click on the New Connection button to display the Add Connection dialog. This will allow you to change all of your connection string arguments. Click on the Advanced... command button and make sure the Persist Security Info value is False.

    After you click OK, click on the Test Connection button to make sure its working. If the connection string works, click OK to close the Add Connection dialog and then click on the Finish button to save the connection.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, April 6, 2009 7:44 PM

All replies

  • Are you able to open the database using Access 2007 / 2003 directly?
    How are you connecting to the database? Can you provide a code snippet? Also if you are getting an exception can you provide the stack trace?
    Tuesday, March 24, 2009 9:36 PM
    Moderator
  • I am able to open both the front end and the back end databases.  Nether have a password.  I created a .Net project for crystal reports.

    I set up the data connection and test it with no problem.  When I try to run the report it asks me for a user name and password.  I tried to enter nothing, and admin but the log in continues to fail.

    This problem did not crop up until I upgraded to Access 2007.  When the database was Access 2003 I did not have this problem.

    Thanks.
    Tuesday, March 24, 2009 10:14 PM
  • What does the database connection string look like?
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, March 30, 2009 5:12 PM
  • Sorry it took so long to answer, but I can not find where the connection string is located.
    Tuesday, March 31, 2009 10:15 PM
  • Did you use the designer to create your data source? The data source will have properties you can look at in order to determine what the connection string is.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Tuesday, March 31, 2009 11:18 PM
  • I used the designer and added a new data source in VS2005.  Upgraded the to VS2008 and started having problems.

    I used the Data Sources panel to add a new data source and this is the connection string it provided

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Starfleet\PBEM_Tools\SFB_Annex\Annex2009_be.accdb;Persist Security Info=True

    I ran the report and when I click on it I get a Database Login screen that fails.

    "Crystal Report Windows Forms Viewer

    Logon Failed try again."






    Wednesday, April 1, 2009 10:13 PM
  • What I usually suggest doing first is to remove all connection string arguments with the exception of the Provider and the Data Source. So in this instance I would remove the Persist Security Info argument and then give it another try.

    I'm also going to assume that the database is located on the local machine and not a network resource. If it is on a network resource then the user must have full permissions to the folder where the database is located.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Wednesday, April 1, 2009 11:50 PM
  • Hi Paul,

    I had a chance this weekend to work on this problem.  I can not find the connection string listed anywhere.  I looked in the dataset and the data sources.

    Where should I be looking?

    Thanks.
    Monday, April 6, 2009 7:13 PM
  • If you display the Dataset in the Designer you should be able to change the connection string. What you need to do is right click on the Dataset in the Designer and select Configure from the menu. Click on the Previous button twice to display Data Connection dialog. From there click on the New Connection button to display the Add Connection dialog. This will allow you to change all of your connection string arguments. Click on the Advanced... command button and make sure the Persist Security Info value is False.

    After you click OK, click on the Test Connection button to make sure its working. If the connection string works, click OK to close the Add Connection dialog and then click on the Finish button to save the connection.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, April 6, 2009 7:44 PM