Hi folks, I have strange error.
Using stored procedure in Power App.
In develop mode, it works perfectly and retrieving my data from SQL.
But, when I run(play) app and try load data from sql, immediately got error:
DSA.dboprocradpakugamyba failed: { "error": { "code": 500, "message": "Null object cannot be converted to a value type.\r\n at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)\r\n at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)", "source": "europe002-002.azure-apihub.net", "path": "choose[3]\\when[1]\\choose\\when[2]", "policyId": "", "clientRequestId": "5d876b9a-94eb-49b4-929c-b8c2c7c6fb8b" } }
Authoring version: 3.24034.17
With other Authoring versions, same result.
Any tips? help?
END TRY
BEGIN CATCH
SELECT
ERROR_NUMBER() AS ErrorNumber,
ERROR_SEVERITY() AS ErrorSeverity,
ERROR_STATE() AS ErrorState,
ERROR_PROCEDURE() AS ErrorProcedure,
ERROR_LINE() AS ErrorLine,
ERROR_MESSAGE() AS ErrorMessage
ROLLBACK TRANSACTION
SELECT @Error=@@ERROR, @Rows=@@ROWCOUNT
IF @Rows!=1 OR @Error!=0
BEGIN
SET @ErrorMsg='ERROR 20, ' + ISNULL(OBJECT_NAME(@@PROCID), 'unknown') + ' - unable to ???????? the ????.'
IF @@TRANCOUNT >0
BEGIN
ROLLBACK
END
SET @LogInfo=ISNULL(@LogInfo,'')+'; '+ISNULL(@ErrorMsg,'')+', Error='+@Error+', Rows='+@Rows
-- INSERT INTO MyLogTable (...,Message) VALUES (....,@LogInfo)
-- RETURN 20
END
END CATCH
END
Same issue for me as well error 500 while accessing Stored procedure from SQLserver through PowerApps canvas apps when published.. In design mode in the browser it works as well
The preview mode feature is getting that error oly on publish but from automate it works fine as well as from dseigner mode in canvas apps as mentioned above
Same here: works fine in preview, 500 error on published, for every user. The strange thing is that it worked last week, and I changed nothing but the stored procedure itself, but not its parameters or inputs, just its output.
Also, a fun, related bug: renaming the SQL Server connection from the default causes calls to it to error out with a 404 error, and what's more, the 404 error remains even if the connection is re-renamed to its original name. The only way to fix it is to remove and recreate the connection.
I'm also having this issue. Pulling data from sql server works okay but get the error 500 when using stored procedure. Tried using stored procedure directly and by creating a collection.....same issue....error 500.
Works in the preview when developing which is frustrating.
I'm using the 1 month's free trial.
I'm half suspecting that it because I'm not passing any parameters...
hold on.....I've just tried with parameters and it works so then tried without and now it works.
Is this an intermittent issue?
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1