jpegasus jpegasus - 21 days ago 10
SQL Question

Get the ID from Azure table entry

How do I get the id from an azure table entry? I'm working on android and need to use the id created by default for a table (when using the azure mobile service) to reference an item in a table. However I am unable to access it? If I add an id attribute to my object being used, I receive an error. Is there some simple way to do something like result.getID?

Answer

You stated you're using Azure Mobile Services -- there are a couple of Samples available on the Azure Site and this link (http://azure.microsoft.com/en-us/documentation/articles/mobile-services-windows-dotnet-how-to-use-client-library/#inserting) has more information about inserting data using Mobile Services. Specifically, you need a data member called "Id" as these should be generated for you. The object should have the Id member set following the call to Insert on the service.

I hope that helps

Comments