Azure mobile apps not seeing any tables in easy table - azure

I'm creating a mobile app backend with Azure App Service. I created a database connection to an existing sqlserver db. However, when I clicked on the Easy Tables blade there were no results of the current table. How can I use the existing tables with this mobile app? Thanks

OK i figured this one out .. make sure the app connection string is correct, then go ahead and add the table to the easy tables list (like a new table), it will pick up all the existing columns in the table automatically!
Be careful: It also messes with the table structure adding deleted and roversion etc columns in azure style. It doesnt seem to delete anything though

Related

Best practice to query an Azure database that is being updated repeatedly

I have an Azure database (using SQL Database), and also a separate device that measures floats (not relevant to the question).
As and when the data is being updated, say once every 5 minutes, I wish to update the database so that a new row is being formed with this data. I then intend to connect to PowerBI using the Azure database to form graphs etc.
As mentioned in the title, what would be the best practice? I have done my due diligence and it seems that the best way would just be to update the Azure database. Or should I consider updating a CSV file, then connect the CSV file to the Azure database and update it from there?
Reason why I'm considering to go the CSV file route is because I see that Excel has in-built refresh function, but I couldn't find anything from the Azure side.
https://support.office.com/en-ie/article/refresh-an-external-data-connection-in-excel-1524175f-777a-48fc-8fc7-c8514b984440
If you want to use Excel, you can see this Azure official document: Connect Excel to a single database in Azure SQL database and create a report.
Connect Excel to a single database in Azure SQL Database and import data and create tables and charts based on values in the database. In this tutorial you will set up the connection between Excel and a database table, save the file that stores data and the connection information for Excel, and then create a pivot chart from the database values.
Then, you can use the "Refresh Data" and try the tutorial you have found.
Hope this helps.

Migrate the identity local sql to an existing database on azure

I am sort of new to MVC, as it has been a few years since I used it.
I created a new site with individual passwords option selected. The wizard created a local database for me, and uses code first to create the database and table for identity management.
I tried changing the connection string to be the same as my entityframework connection string, and that did nothing, even after I ran the app. In fact, it seemed to have no effect, and somehow it still had access to the local db version.
How do I point the existing code first tables to build a new set of tables on my existing azure database, and then use those tables going forward?

Unable to create Easy Tables in Azure

I have created a Mobile App and Database in Microsoft Azure. Now I am trying to create Easy Tables from Mobile App but I am getting error message "You need database to use East Tables. Click here to create one.
Even though I have existing database Easy Tables doesn't list it.
Below is the screenshot.
I have mapped Data Connection with mobile app, below is the screenshot
It would be great if anyone can help, I am new to azure.
Your connection string must be created with name: MS_TableConnectionString
Just because you have a database doesn't mean it is linked. Click on Data Connections, then Add, then add your existing SQL database.
Note that Easy Tables won't recognize the existing tables unless you add them through Easy Tables. There are notes around the format of Id (it needs to be
a string) and other fields.
When you created your Database Server did you check "Allow azure services to access server"? That could be why you cannot see the Database listed.

Accidently Deleted Contents of Azure Mobile Service table

I was deleting a single record in the Classic Azure Portal in Mobile Services Browse. The entire contents of the table has now disappeared. Please help!!! How do I restore the contents. The table and scripts are still there.
I have gone into the SQL database tab and clicked restore from point in time, this creates a new DB but does not give me an option to restore to Azure mobile services.
Restoring a database always creates a new database on the same server as the original database, so the restored database must be given a new name. Once complete, the restored database is a normal fully accessible online database charged at normal rates based on its service tier and performance level. If you are restoring the database for recovery purposes you can treat the restored database as a replacement for the original database, or use it to retrieve data from and then update the original database. Please check this article for details.
So if you are going to use the new database, you can re-configure your mobile service to use the new database as following snapshot shows(click the mobile service, go to configure tab then click change database):

How to rename table from Azure mobile service?

I am following this article. In step # 4 TodoItem table is created in mobile service. Now when I manage the database of that mobile service, I am getting the rename feature. (manage database is the screen which opens as silverlight app). So I want to know how can I rename TodoItem table to any other name. I created as TodoItem. Mobile service and database both is having that name I can rename in manage database but how can I rename from mobile service page.
You would have to delete the old table in the portal (which no longer points to a table in SQL, because you renamed it - IT'S IMPORTANT TO DO THIS FIRST OR YOU'LL DELETE YOUR DATA!). Then create a new table in the Portal with the same name as the new table - that should automatically hook up to the existing table.
For anyone who comes along later still looking for the answer to this...
Based on ConfusedNoob's reply I verified these steps:
On Windows Azure management site (manage.windowsazure.com), go to SQL DB section
Select your DB and click "Manage". Sign in to the DB management portal.
Go to Administration and click "Design" for your DB
Select "Edit" for the table you want to rename
Change the table name to the new name, click Save
Go back to Azure management. View your Mobile Services Data.
Highlight your table that you want to rename and delete it. (Since you renamed the underlying DB table, the Mobile Services table is no longer associated with the actual table).
Create a Mobile Services table with the new table name. Your data should show up in there. Do not create the table with the new name first because it will create a new empty table instead of pointing to the existing table.

Resources