Azure Mobile Services Tip o’ the Day

So I’ve been creating the database tables for the RPG I’ve been working on and finally got connected to the database in Visual Studio using the Server Explorer rather than creating the tables in the Azure Portal. Spent about 2 hours working on the Spell database and hooked up the UI in the game to query it. Imagine my surprise when I tried to pull some data from the table and got:

Rest Response:{"code":404,"error":"Error: Table ‘Spell’ does not exist."}

I went back and queried other tables (that I’d created in the Portal) and had no problems. Scratching my head, I turned to my friend Bing. Turns out tables not created through the portal don’t get hooked up to the Mobile Service automatically. Created the table in the Mobile Service and the query worked fine.

While it’s a bit easier to use the tools in Visual Studio or SQL Service Management Studio an extra step will be required to be able to use the tables in your Mobile Service. Whether that is worth it is going to be a YMMV type of thing I guess. Maybe creating the table in the Portal and fleshing it out with other tools is a good tradeoff.

Leave a Reply

You must be logged in to post a comment.