none
how to force user to enter password while selecting the mdb in win application RRS feed

  • Question

  • Hi,

    I am developing windows application. backend i'm using microsoft access.

    test1.mdb file has set to password protected (Ex : password : pass007).

    when end user select test1.mdb from my C# windows application, then the system should ask password to process further action.

    if he enter the password (password : pass007) then only system do further action.

    how to do this..?

    Monday, June 25, 2018 10:31 AM

Answers

  • when end user select test1.mdb from my C# windows application, then the system should ask password to process further action.

    The end user shouldn't be selecting any database file.

    if he enter the password (password : pass007) then only system do further action.

    The below link is how it should work.

    https://www.csharp-console-examples.com/general/c-creating-login-form-with-ms-access-in-windows-form-step-by-step/

    The user should be able to login to your application and use it. They don't need to know the password to the database. The password should be part of the connectionstring that is known by your program

    https://www.connectionstrings.com/access/

    • Marked as answer by Gani tpt Thursday, June 28, 2018 8:44 AM
    Monday, June 25, 2018 11:45 AM
  • Hi Gani tpt,

    Thank you for posting here.

    For your question, you could add a messageBox to ask for password before connection. The password will be send to the connection string. Your connection should include the password parameter.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Gani tpt Thursday, June 28, 2018 8:44 AM
    Tuesday, June 26, 2018 7:08 AM
    Moderator

All replies

  • By adding a credentials dialog before your program continues?!
    Monday, June 25, 2018 10:34 AM
  • when end user select test1.mdb from my C# windows application, then the system should ask password to process further action.

    The end user shouldn't be selecting any database file.

    if he enter the password (password : pass007) then only system do further action.

    The below link is how it should work.

    https://www.csharp-console-examples.com/general/c-creating-login-form-with-ms-access-in-windows-form-step-by-step/

    The user should be able to login to your application and use it. They don't need to know the password to the database. The password should be part of the connectionstring that is known by your program

    https://www.connectionstrings.com/access/

    • Marked as answer by Gani tpt Thursday, June 28, 2018 8:44 AM
    Monday, June 25, 2018 11:45 AM
  • Hi Gani tpt,

    Thank you for posting here.

    For your question, you could add a messageBox to ask for password before connection. The password will be send to the connection string. Your connection should include the password parameter.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Gani tpt Thursday, June 28, 2018 8:44 AM
    Tuesday, June 26, 2018 7:08 AM
    Moderator