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 / Save image in SQL from...
Power Apps
Unanswered

Save image in SQL from Power apps

(0) ShareShare
ReportReport
Posted on by 80

Hi everyone,

 

How can we submit the form having image column from power apps to MS-SQL?

Categories:
I have the same question (0)
  • Verified answer
    Julien59 Profile Picture
    44 on at

    Hi

    After saving your form, you will have to patch it using this method. 

    Picture is a field type "image" 

    Picture_varchar is a varchar

    Patch(
     '[dbo].[pictures]';
     {
     picture: UploadedImage.Image;
     picture_varchar: JSON(
     UploadedImage.Image;
     JSONFormat.IncludeBinaryData
     )
     }
     )

     

  • lisha Profile Picture
    80 on at

    Hi @Julien59,

    Thanks for the sol, but whenever I tried to use this sol, the patch function show me the error of server response failed. Can you please tell me how can I solve this?

  • Julien59 Profile Picture
    44 on at

    Do you have a primary key on your table ?

  • lisha Profile Picture
    80 on at

    Yes, ID is the primary key for the table.

  • Julien59 Profile Picture
    44 on at

    Can you share the table schema and also the patch function  ?

  • lisha Profile Picture
    80 on at

    lisha_2-1655293712419.png

     

     

    SubmitForm('frm_edit info_1');Patch(User_data_1, Defaults(User_data_1), {Id:DataCardValue12_1,Picture_var:UploadedImage3_1.Image,Picture_var: JSON( UploadedImage.Image, JSONFormat.IncludeBinaryData ) } )

  • Julien59 Profile Picture
    44 on at

    Your Picture column should be Image type and not varbinary(max) type

    For ex : 

    Julien59_0-1655294005102.png

     

  • KI-13090739-0 Profile Picture
    12 on at

    I wonder if varchar(max) is the right field type for images. It has been told to use varchar(max) from some users, but why is the image type so much easier to use on the PowerPlattform?

  • MissingLink Profile Picture
    236 on at

    You probably want to watch this.  It explains what is going on between PowerApps and SQL.  PowerApps: Save images from Camera, Pen and Add Picture control to SQL and display in a Gallery - YouTube

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard