Error Occurred While Opening ODBC Connection on Sage 300 Application using C# RRS feed

  • Question

  • ERROR [08001] [Simba][SimbaEngine ODBC Driver][DRM File Library]Invalid account name.ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failedERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).

    Facing the above error While Connecting to Sage application using ODBC.

    The above exception thrown at while opening the connection as shown below.

    using (OdbcConnection connection = new OdbcConnection("dsn=somedsn;uid=sage;pwd=sage"))
        connection.Open(); //Exception thrown here
        // More code here

    I have used Visual Studio 2017 to build and debug the c# application in Windows 10. Can anybody help me on this?

    Tuesday, April 16, 2019 12:12 PM

All replies

  • Hello,

    It could be how the app is compiled e.g. if set to 32-bit change 64-bit and if 64-bit change to 32-bit and compileor setup for "Any CPU", test it out.

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    profile for Karen Payne on Stack Exchange

    Tuesday, April 16, 2019 1:39 PM
  • Hi

    Thank you for posting here.

    Since this thread is related to sage 300 appplication, it is a third-party product, you could post in the following forum.


    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.

    The Visual C# forum discusses and asks questions about the C# programming language, IDE, libraries, samples, and tools.

    Best regards,


    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.

    Wednesday, April 17, 2019 2:20 AM
  • Thank for you reply Karen. I have posted this question in StackOverFlow. As it is mentioned we should not mention this forum.


    It is set to 32-bit build. And I cannot set it to 64-Bit because other dlls of Sage support only 32-bit connection. Compiler is set to Any CPU. But still I get the error. One more thing to mention is If the build is done another system and deployed it in sage system it works fine. But if the build is done the same system is throwing the above error.

    • Edited by Phani Edara Tuesday, April 23, 2019 6:34 AM
    Tuesday, April 23, 2019 6:28 AM