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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Save image in SQL from...
Power Apps
Answered

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard