none
Error in new OleDBCommand RRS feed

  • Question

  • This is a code which access a DB table.


    However an error occur in the line in the red rectangle.

    Here is an detail of the error.

    Can anybody help me?

    Sunday, March 17, 2019 7:05 AM

Answers

  • Probably authentication failed or the connection string is incorrect. Show some details about ConnectionString_CDMMU.

    • Marked as answer by Jeff0803 Sunday, March 17, 2019 3:19 PM
    Sunday, March 17, 2019 9:06 AM
  • Hello,

    If this is ms-access, see the following connection strings and if the database requires a password that is shown also.

    If the database has been encrypted with a password and you are using the correct password the encryption method may be incorrect for OleDb. Legacy Encryption is needed, check this by 

    • Open Access in exclusive mode.
    • Under the file menu, options.
    • Find client settings.
    • At the bottom of settings make sure legacy encryption is being used.

    If this is another database then check the connection string in the first link above by finding the database, all are listed on this site.


    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.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by Jeff0803 Sunday, March 17, 2019 3:19 PM
    Sunday, March 17, 2019 10:31 AM
    Moderator

All replies

  • Probably authentication failed or the connection string is incorrect. Show some details about ConnectionString_CDMMU.

    • Marked as answer by Jeff0803 Sunday, March 17, 2019 3:19 PM
    Sunday, March 17, 2019 9:06 AM
  • Hello,

    If this is ms-access, see the following connection strings and if the database requires a password that is shown also.

    If the database has been encrypted with a password and you are using the correct password the encryption method may be incorrect for OleDb. Legacy Encryption is needed, check this by 

    • Open Access in exclusive mode.
    • Under the file menu, options.
    • Find client settings.
    • At the bottom of settings make sure legacy encryption is being used.

    If this is another database then check the connection string in the first link above by finding the database, all are listed on this site.


    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.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by Jeff0803 Sunday, March 17, 2019 3:19 PM
    Sunday, March 17, 2019 10:31 AM
    Moderator