web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Updating BLOB field on...
Power Apps
Unanswered

Updating BLOB field on SQL Server

(0) ShareShare
ReportReport
Posted on by 2
I cannot seem to get the EditForm to update my BLOB field. I have done my due diligence I think, so maybe someone has some ideas for me or know of some limitations I'm not aware of.
 
My data source is SQL Server Express. I have reproduced this problem on a simple auto-generated app with a gallery on the left and detail view/edit panel on the right. These are connected to a single SQL Server table, containing several text, numeric, and one BLOB field (VARBINARY(MAX)) I use to store photos. I ultimately want to be able to take pictures using the device camera, etc. but for this test am just trying to delete an existing BLOB field contents in one record.
 
So I have a few existing records in the table with images. By default, Power Apps creates the edit form and the DataCard for the Blob just includes a DataCardValue label that shows something like this: 
 
appres://datasources/%5Bdbo%5D.%5BDatos_De_Macroinvertebrados_App%5D/table/%5Bdbo%5D.%5BDatos_De_Macroinvertebrados_App%5D/rows/90/inline/Blob
 
That's all good I think; it is just a text representation of where the record came from (e.g., table name and primary key = 90).
 
To see what it looks like, I unlocked the datacard and added two controls: an image and button. The button is used to set a variable "gblReset" when clicked (it is appropriately initialized of course). The datacard's Default property is 
 
If(gblReset,Blank(),ThisItem.Blob)
 
The image's "Image" property is of course set to Parent.Default. For testing, I used similar code on one of my text fields just to see if there is difference and whether I have things wired up correctly. I've been working on this long enough that I don't think I have stupid mistakes with global or context variables, etc.
 
When a record is selected, the detail screen correctly displays all fields, and the image control nicely shows the image just like I want. When I click the button, the image (and test text field) both go blank. When I accept the changes and the SubmitForm happens, I see that the text field is set to null, but the BLOB field is not.
 
In summary, I can get the BLOB images to nicely move down from SQL Server into my form, but I cannot seem to be able to update the datasource with changes to the BLOB field.
 
Note that in testing I also tried very small JPG files, so the problem is not associated with too large files.
 
Thanks much,
 
Chris
I have the same question (0)
  • CU28010046-0 Profile Picture
    2 on at
    I just tried this: I changed the VarBinary(max) field to an Image type field. When I rebuilt my test app, the DataCard for the field automatically had an Image and AddPicture control, correctly showed the downloaded image, let me select a new one, and then updated the datasource with the new image.
     
    I therefore conclude that the image controls do not correctly handle the update of Varbinary fields, but do so for Image fields.
     
    I would prefer to continue to use Varbinary so I can store other types of binary data (PDF, ZIP, etc.) that would NOT be used in Power Apps, But I don't know if there is a work-around that would allow Power Apps to update the Varbinary field with image data.
     
    Thanks for any confirmation or suggestions you might have.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard