cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
agigliotti
Frequent Visitor

Display image from SQL Server On Premise Connection in PowerApps App

When I create an app from my data, which is a SQL Server on Premise Connection, choose a table that contains a field with a varbinary(max) data type, which contains photos, it will not display in the app I create when I insert an image and use "ThisItem.ppt_photo" as the function, ie. "image = ThisItem.ppt_photo.  It is just blank.  I know the photo is valid, because I can get it to display if I use the same field and table as a source in SSRS (SQL Server Reporting Services).  Is this functionality not supported, or am I doing something wrong? I am very new to PowerApps. Below is the screenshot of the powerapps design page where I am attempting this.

 

 

 

 powerapps_webdesinger.jpg  

18 REPLIES 18

Hi, @agigliotti

 

¿How many fields are you looking for in the query for sql in powerapps? I give you an idea,search alone a field or primary key

Not to hijack this thread, but I figured this would be appropriate. Is it possible to  set an image column in SQL (with NVARCHAR as the format) and link images from a One Drive account?

Hi, @BrendonBrooksP1

 

with words more concrete,Please he Specify what you want make, because i don't understand, you you want make a app for submit a Photo a onedrive or get the image in url of onedrive?

Anonymous
Not applicable

@agigliotti

Can you please tell me how you were able to display the photosh from SQL Server to the image control in Powerapps?

 

Regards,

Manish

cursors
Advocate II
Advocate II

The story around accepting an image from a PowerApp and saving it to a SQL Server database and then being able to query that database for the image and display it in a PowerApp needs some real work from the development team. 

If you provide an image in PowerApps using the Add Image control, patch the image to the database and then attempt to redisplay the image in the PowerApp using the data that was just patched to the database- it just doesnt work.

If you patch to a varchar data type, it merely writes the path to the image on the device's local storage: blob:https://us.create.powerapps.com/[guid] for the web client or blob:http://localhost:[port]/[guid] for the phone client - both are invalid paths and the image does not render.

 

If you patch to a varbinary data type, it saves the blob itself - but PowerApps Image control can not render the binary data.

 

It seems like this is something that should just work (like it does in CDS) - please let me know if I am missing something.

I know this is a pretty old thread but I seem to be still having these same issues. Is there a resolution to this? 

stapes
Impactful Individual
Impactful Individual

@Mateo_Escobarin your example, how did you get 'data:image/jpeg;base64,/9j/' - did you prefix it in your select statement?

 

my picture fields look like this:

 

'89504E470D0A1...

 

Yes, that is basically right.  I actually populated the table from another table and the insert statement to do this used the prefix like you mentioned.

ElectricLlama2
Frequent Visitor

Adventure works sample data has a thumbnail stored in VARBINARY(MAX) field in field SalesLT.Product.ThumbnailPhoto

 

1. Create a gallery from this table with an image control

2. In the Image property put ThisItem.ThumbnailPhoto

3. You should see the image

 

This is a way of storing images in the database if you don't want to have to reference public images

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,237)