cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
stapes
Level 8

Save a Photo Image from a Phone App using Execute Stored Procedure in a Flow.

I am trying to save Photos to a DB using a PowerApps Phone App.

This is my Table:

 

Photo Images Table.PNG

 

The Stored Procedure looks like this:

ALTER PROCEDURE [dbo].[SP_SS_SavePhotoToDB]
@photoImage image,
@photoLinkID varchar(20) = ''
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO [dbo].[TBL_SS_PhotoImages]
([PhotoImage]
,[PhotoLinkID])
VALUES
(@photoImage,
@photoLinkID)
END

 

The Flow Run Failed with the following error:

Invalid binary encoding.
inner exception: Invalid binary encoding.
clientRequestId: 198cea2c-9f2f-4441-a151-106f9aed0a24

 

My Flow is being called from my app here:

SavePhotoToDB.Run(ImageGallery_1.Selected.Image1_1.Image,StockCode)

 

SavePhotoToDbFlow.PNG

 

The image is initially saved  in the App like this:

Collect(MyImages,{PhotoImage: MyCamera_1.Photo, PhotoLinkID: StockCode})

 

Any idea what I am doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
EricLott
Level 10

Re: Save a Photo Image from a Phone App using Execute Stored Procedure in a Flow.

Change your data type from image to varchar(max)

View solution in original post

2 REPLIES 2
EricLott
Level 10

Re: Save a Photo Image from a Phone App using Execute Stored Procedure in a Flow.

Change your data type from image to varchar(max)

View solution in original post

stapes
Level 8

Re: Save a Photo Image from a Phone App using Execute Stored Procedure in a Flow.

@EricLottThank you. That worked after I changed to varchar(MAX) in both the Table and the Stored Procedure.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (6,052)