none
Problems running new C#/WPF/accdb program on other computers RRS feed

  • Question

  • I have a program I developed using C# and WPF in Visual Studio 2015.

    It works perfectly, but when I copy the executable to another PC, with the database in an identical location, the program bombs.

    Any ideas as to what might be causing the error?

    Wednesday, April 25, 2018 3:08 AM

All replies

  • It works perfectly, but when I copy the executable to another PC, with the database in an identical location, the program bombs.

    And you copied things to what location on another PC?

    Wednesday, April 25, 2018 4:47 AM
  • I have a dll in which I specify that.

    It doesn't bomb until after I have retrieved at least one record, so I know it sees the database.

    ...and to ensure I'm using the same version of the database, I copy the database from the computer where It's successful, up to a shared server drive, then down into the second computer.



    • Edited by irsharp Wednesday, April 25, 2018 10:55 AM
    Wednesday, April 25, 2018 10:14 AM
  • Post the relevant code along with your config file pointing to the DB so it can be confirmed to be correct. Also ensure that the necessary database components are installed such that the database connection will actually succeed.

    Then post the exception you're getting in your app along with the complete information around call stack, message, type, etc.


    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, April 25, 2018 2:09 PM
    Moderator
  • Certain areas the O/S is using like the Program Files directory is a protected area. So again where are the files,  database files and all located on the hard drive? 
    Wednesday, April 25, 2018 3:53 PM
  • Hi irsharp,

    Thank you for posting here.

    For your question, do you get some exception? If yes, could you provide the error message?

    Does the application reference some files include database? Please check location.

    Here is a simple way to run this application without consider something like database location and so on.

    If you want to do it with ClickOnce, please refer to the following documents:

    ClickOnce - Quick steps to Deploy, Install and Update Windows Based Client Applications.

    Deploying Windows applications using ClickOnce (Visual Studio 2008)

    How-To: Use ClickOnce to deploy your Applications

    If you want to use Windows Installer(MSI), please refer to the following document:

    Creating an MSI Package for C# Windows Application Using a Visual Studio Setup Project

    Best Regards,

    Wendy

    Note: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you.
    Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    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.

    Thursday, April 26, 2018 6:38 AM
    Moderator
  • Is Microsoft Access installed on the second computer?

    Tim Roberts, Driver MVP Providenza & Boekelheide, Inc.

    Thursday, April 26, 2018 6:16 PM