Reputation: 326
I am trying to develop an app for windows phone using azure mobile services. I am using authentication services provided by azure portal. After authentication the user needs to enter some data like his name, email id etc. The Problem I am facing is.. every time when the user enters different set of input values, it creates different rows for that particular user. I want to restrict the user with only one row so that he cant create more than one row. How can I do That.
Upvotes: 2
Views: 82
Reputation: 39102
You have to check first if a row for this user is already present (using a "select", try to get a row with the user's ID), and if it finds one, just perform a update with new values. Otherwise you are free to insert a new row safely.
That means you will need to add a new column (in case you haven't already), that contains a unique user ID, that you can use to check if the user is already there.
Upvotes: 4