0

I want to ask if the Azure Easy Tables does have the row size limit ?

If yes what is the limit ?

Thanks for your answers !!!

Adam
  • 806
  • 2
  • 8
  • 15

1 Answers1

1

We know the back end of easy table in Azure is Azure Sql . And a table can contain a maximum of 8,060 bytes per row in Azure Sql usually. There is also a LOB columns type that the limit is 2G. For better performance, I suggest you better don't reach 8060 bytes. If you have large data to store, you could put a link instead.

Can I save image to Azure blob storage and name, description to Azure Easy Tables

Yes, you could save image to Azure blob directly. You could try the following code:

Code in app.config(storage connection string):

<appSettings>
  <add key="StorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=×××;AccountKey=×××" />
</appSettings>
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
            CloudConfigurationManager.GetSetting("StorageConnectionString"));
            CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
            CloudBlobContainer container = blobClient.GetContainerReference("container001");
             CloudBlockBlob blockBlob = container.GetBlockBlobReference("apple.jpg"); 
            using (var fileStream = System.IO.File.OpenRead(@"D:\apple.jpg"))
            {

                 blockBlob.UploadFromStream(fileStream);
            }

enter image description here

In Easy Table, if I convert image to base64 string to store, I also get en error about the request entity is too large. So you could copy the blob image link to store in Easy Table instead. You could copy the link by click '...'>Blob properties>Url.

var client = new MobileServiceClient("https://[your mobile service name].azurewebsites.net");
IMobileServiceTable<SiteTable> todoTable = client.GetTable<SiteTable>();
SiteTable siteTable = new SiteTable(); //SiteTable is model class name
siteTable.MyImage = " blob image link";
await todoTable.InsertAsync(siteTable);
Janley Zhang
  • 1,567
  • 7
  • 11
  • I was trying to insert a row with an image converted to Base64 string. I always got an error. Can I save image to Azure blob storage and name, description to Azure Easy Tables. Is there any good sample code ? Thanks for your answer !!! – Adam Mar 20 '18 at 08:00
  • @AdamSoták I have updated my answer. I hope it is helpful. – Janley Zhang Mar 20 '18 at 08:55
  • Yes this is very helpful, thanks ! But how to load it back and display it in list view ? – Adam Mar 20 '18 at 09:43
  • No, I am looking for Xamarin.Forms solution. – Adam Mar 20 '18 at 09:49
  • Unfortunately, I am not very familiar with Xamarin.Forms. In my opinion, you could could get a list of image url from Easy Table, then show image from url. I just search an [article](https://forums.xamarin.com/discussion/88727/how-to-load-image-from-url) about how to load image from Url. – Janley Zhang Mar 20 '18 at 09:53