none
Cannot add new data source from MySQL to Visual Studio 2017 RRS feed

  • Question

  • Hello. So, the problem i have here is that when i try to create a new data source this error pops up. I reinstalled MySQL, Visual Studio and connectors (including MySQL for Visual Studio) and even tried older versions, but they didn't work. 

    It shows MySQL Database when i try to select new Data Source, which means that connectors work. But when i try to connect all of it to the Visual Studio it just doesn't work and i can't use any of the data from MySQL and command  "Using MySQL.Data.MySQLClient" doesn't seem to work either. If someone has any idea how to fix this i would be more than happy to hear it.

    Thanks in advance.

    ERROR MESSAGE:
    "Some updating commands could not be generated automatically. The database returned the following error:

    Unexpected error."

    • Moved by Stanly Fan Monday, March 19, 2018 8:14 AM
    Friday, March 16, 2018 3:18 PM

All replies

  • Hello,

    From your description the problem is not with Visual Studio but instead with the schema of your database given that you can connect both with the data wizard and via the native provider but not have classes generated. Since the error is specific to update commands and not select commands the issues usually (but not saying always) is with if there are proper primary keys setup for tables. 

    Please provide the following, the schema of tables(s) e.g.

    Customer table

    Id, int primary key (auto incrementing)

    FirstName, string

    LastName, string
    etc.


    Please remember to mark the replies as answers if they help and unmark 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.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Saturday, March 17, 2018 8:47 AM
  • Hi Shonad_,

    This forum is discussing and asking questions about the Windows Form and ClickOnce, it will be more appropriate to ask your question at MySQL Forums.

    Thank you for your understanding.

    Regards,

    Frankie

    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.

    Monday, March 19, 2018 8:11 AM