MySQL cant connect to Views in DataSource RRS feed

  • Question

  • Hi

    I can connect to my MySQL DB ok and import all the tables fine, but I cant seem to see any of my Views in the list and therefore am able to import them.

    Any help would be appreciated.


    Wednesday, March 20, 2013 1:06 AM

All replies

  • I'm not sure this is exactly your situation, but if I might take a stab at this.  I'm guessing that this will work similarly to how SQL Server works.

    In order for LightSwitch to recognize views, there has to be primary key's included.

    So, if your view is from one table, add the primary key to the output columns of the view.

    If it is from multiple tables, include the key field for each table included in the view.

    I'm sure there is a better explanation from our experts hanging out here, but the solution probably lies in how you use the primary keys in the view definition.

    Would someone please turn on the LIGHT?

    • Edited by JoeB_LS103 Monday, March 25, 2013 7:29 PM
    • Proposed as answer by JoeB_LS103 Monday, April 1, 2013 7:16 PM
    Monday, March 25, 2013 7:28 PM