locked
LightSwitch Guided Tour Customer Database Tutorial Problems RRS feed

  • Question

  • I am working through the LightSwitch Guided Tour Project (http://msdn.microsoft.com/en-us/library/ff852838.aspx) using Visual Basic as my development language and I've run into a couple of problems.

    • In the Working with Data in LightSwitch > Defining Relationships Section (http://msdn.microsoft.com/en-us/library/ff852068.aspx) the graphic doesn't match the instuctions and the "Foreign" and "Primary" data columns have come out reverse of what is stated in the text.  I've tried backing up and stepping through the instructions several times with the same result.

    • When I run the completed project in the Creating Screens > Adding a Local Property section (http://msdn.microsoft.com/en-us/library/ff851991.aspx) I have created an endless loop.  As seen in the graphic below.  I've tried several fixes myself, but still get the same error.

    Could I have created the second problem I am having when I encountered the first problem?  Is this a bug in the instructions?  Is there a fix?

    Thanks in Advance


    TedNewk



    • Edited by TedNewk Interactive Wednesday, November 28, 2012 4:27 PM Inserted another image for clarification
    Wednesday, November 28, 2012 9:51 AM

All replies

  • Yes, you're right, that's the wrong image for the intructions to create a relationship between the Contact table & the Customer table.

    The multiplicity should be One for the Contact table, & Zero or One for the Customer table, meaning that a Contact can have either one associated Customer, or no associated Contact.

    When you add the local property, it looks like they've missing stating to choose Integer as the property's type. Is that what you selected for it?


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Wednesday, November 28, 2012 11:50 AM
    Moderator
  • Actually the instructions do discuss changing NumberOfOrders to an Integer.  They instead opted to use the ToSting Method after Orders.Count.

    As an experiment I made the changed the property to Integer and deleted .ToString and I am still stuck in the same endless loop.


    TedNewk

    Wednesday, November 28, 2012 4:17 PM
  • As another experiment I inverted the instructions for defining relationships by starting with Customers and adding a connection to Contacts.

    After working various combinations in various ways this seems to be the only one that worked!

    Alas! It didn't solve the other problem.


    TedNewk

    Wednesday, November 28, 2012 4:48 PM
  • Yes, that image matches how I described the relationship needed to be. The way the multiplicity properties are filled in for you depends on which table you have open in the table editor when you click "Add Relationship". You can always manualyy change them around, as you did, if the description text below the image of the two tables connected doesn't sound right.

    As for the other problem, I'm not sure what to suggest. I can only assume that it has something to do with some of the code you've entered. You've already found a couple of errors in the article, so maybe there's something else there that isn't quite right.

    Could you experiment with commenting out some code & see when the problem goes away? Once we know what code is causing the problem, it'll be easier to figure out what to do about it.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Thursday, November 29, 2012 1:02 AM
    Moderator