locked
The operating system is not presently configured to run this application RRS feed

  • Question

  • Hi,

    Sorry if this is the wrong forum, I could not find a more appropriate one.

    On a client's window 10 machine our application gets this error when they attempt to open a project. I'm very sure it happens when:
    db.OpenEx( strT, CDatabase::noOdbcDialog | CDatabase::openReadOnly );

    From what I've google'd, I understand this is an office issue. Is that absolutely so? The client has Access and I can open the database in question fine with Access. The DSN is fine. Searching does not reveal there is a log somewhere I can examine, is there?

    Any help is appreciated.

    Thanks, Dan.

    Wednesday, June 15, 2016 8:08 PM

All replies

  • Hi lakeweb1,

    thanks for posting here.

     

    >> The operating system is not presently configured to run this application

    The db.OpenEx seems don’t cause this error information. Since you’re sure with this function, I suggest you to use CDBException::m_strStateNativeOrigin which contains a string describing the error that caused the exception or CDBException::m_nRetCode which Contains an ODBC error code of type RETCODE returned by an ODBC application programming interface (API) function.

    Here is a sample document about Exceptions: Database Exceptions you could refer to.

     

    Best Regards,

    Sera Yu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Thursday, June 16, 2016 7:37 AM
  • Hi Sera,

    I always try-catch CDatabase stuff. My code at that point:

            try
            {
                if( ! db.OpenEx( strT, CDatabase::noOdbcDialog | CDatabase::openReadOnly ) )
                    bOk= false;
            }
            catch(  CDBException* e )
            {
                e->Delete( );
                bOk= false;
                //m_strError = "Data source name not found and no default driver specified"
            }

    From there I would add the the DSN, there would be a message box telling the client. But I've commented this and went straight to an open with the same results as the DSN was fine. I do not get to any of my message boxes, the error hangs my application before it can get there. A message box comes right after any catch I do.

    Thanks, Dan.

    Thursday, June 16, 2016 3:10 PM
  • Hi Sera,

    I would add here that this code has run flawlessly on hundreds machines for a decade now. This is a new problem and is happening on only one Windows 10 machine. The message is clearly from the operating system. But the message does not seem to have any support from Microsoft other than reinstalling office 365. How should I proceed? I have asked my client if they would mind reinstalling office. I'll let you know if that route is taken and it fixes the issue.

    My call to OpenEx(...) is not returning and it is not throwing. The app is not crashing, it is hanging until the message is dismissed.

    Thanks, Dan.



    • Edited by lakeweb1 Friday, June 17, 2016 4:08 PM
    Friday, June 17, 2016 3:45 PM
  • Hi All,

    So here is the deal. We uninstalled office 365 and the message went away. Now I get to a database error without hanging my application. Come to find out there was no database engine installed on this machine, the DSN would not work. Did a 'Microsoft Access Database Engine 2010 Redistributable' installation and now my application runs fine. The original error message and hanging an application out to dry is a really tough. Also this is the first time I've seen a machine that did not have the drivers already installed.

    Best, Dan.

    Monday, June 20, 2016 6:02 PM
  • Must be something new. I got a call from a client that wanted me to install our software on a new machine, he had office 365. I installed and got that goofy dialog. This time when I checked the DSN, it indicated that the drivers were installed! If this had have happened with the first client I would still be scratching my head. So without uninstalling Office I just ran the 'Microsoft Access Database Engine 2010 Redistributable'. That fixed it. Am I the first person to suddenly run into this?! Can't be, but it looks that way.

    Best, Dan.

    Monday, June 20, 2016 10:19 PM
  • Hope this long time waiting won't cause too much inconvenience.

    According to your description, your application will be well without office or with Microsoft Access Database Engine installed? Seems the ODBC mechanism need Microsoft Access Database Engine to run well. There will be some protections or something else it need. For this case, I suggest you to go to Access for Developer forum for better help.

    Best Regards,

    Sera Yu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Wednesday, June 22, 2016 9:24 AM
  • Hi Sera,

    I had to do the 'fix' again today on a user that uses Office 365. I'm not developing an 'Access' application. Our software does not use access. We use the ODBC drivers. It just happens that we use an mdb file.

    This is not my problem, this is Microsoft's problem. At this point I'm just trying to give you guys a heads up about the problem. Consider the error message that titles this thread and the complete lack of reasonable information about the message.

    As long as reinstalling the database drivers fixes the problem, that is my solution. There is nothing else I can do as I'm not privy to what Microsoft is doing under the hood. If I were part of Microsoft management, I would take what has happened to me with a little more than just a grain of salt.

    Best, Dan.

    Friday, June 24, 2016 7:48 PM
  • I have a client that I have had to run the 'Microsoft Access Database Engine 2010 Redistributable' on four times now. It seems that when he gets updates for his computer the Access driver gets broken so that meaningless message comes up and crashes my software. Is there anybody else that is getting this??????? Am I the only person using Access drivers through the ODBC interface with MFC? Well I know I am not because I had an IT guy a couple of weeks ago that said it fixed another program he uses that got that message but only on a windows 10 machine.

    At the least the fix is simple enough. For the guy I helped today, he is just going to keep a copy of the redistributable on his drive and when he sees that message, run it.

    Best, Dan.

    Tuesday, July 26, 2016 5:16 PM