cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Impactful Individual
Impactful Individual

Microsoft Flow Stored Procedure failure

Dear community

 

I have been working with Flow for a while now and im facing an issue that i can't resolve, i have a Azure SQL database which has stored procedures, one of these (the one with an issue) has some parameters and to put it simply it does the following, checks based on parameters if the record exist or not, if yes don't insert the record, if not, insert it. Thats it.

 

Im having a return code 400 with the following error: String or binary data would be truncated.\r\nThe statement has been terminated.\r\nclientRequestId: fc88300e-6f98-4191-b87b-e4939c6bd444

 

I know what that means as i know SQL but there is no data over the size allowed, types are all matching, i have even simplified the Stored Procedure to rule out certain things but no results ... I don't understand how this can be or where the issue can come from.

I have seen something about ntext type that it can generate 2 bytes instead of 1 but still this makes no sense for me as i can give the parameter 1 char it can not exceed the size allowed and defined on SQL.

 

I have checked them manually in the Flow itself and NONE of the parameters are exceeding the size.

 

 

Here is my Stored Procedure:

SyntaxEditor Code Snippet

@p1 AS nvarchar(2000),
@p2 AS ntext ,
@p3 AS datetime
)
AS
BEGIN

   IF EXISTS (SELECT 1 FROM TableName WHERE 
																	  param1 = @p1													               
													                  AND param3 = @p3																	 
																	  AND datalength(param2) = 0)
				  
				  SELECT param2 FROM EmailsTest WHERE datalength(param2) = 0
													                  param1 = @p1													               
													                  AND param3 = @p3																	 
																	  
	ELSE
	
   BEGIN
         INSERT INTO TableName (param1,param2,param3)
		 VALUES (@p1,@p2,@p3)
   END

END

 

 

Suggestions, questions & help are very welcome !

Kind regards !

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Impactful Individual
Impactful Individual

Re: Microsoft Flow Stored Procedure failure

OK so this is all on me, there are a lot of propertiesi had overseen 1 (new added) property and this offcourse was too long so this was my problem here...

Solved.

View solution in original post

1 REPLY 1
Highlighted
Impactful Individual
Impactful Individual

Re: Microsoft Flow Stored Procedure failure

OK so this is all on me, there are a lot of propertiesi had overseen 1 (new added) property and this offcourse was too long so this was my problem here...

Solved.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,191)