Input parameter not available for Odata function

Hello Radzen Team,

I have not bugged you in a while because the Radzen development environment is working so well for me. what a great product.

however today I have an issue issue using stored procedures. I am not able to pass input parameters. here is my set up.

I publish a Radzen Application which includes stored procedures from a SQL Database. I then use this published app (TechneauxAPI) as my Odata source for multiple end user applications.

when I infer the TechneauxAPI odata source, I select the list of functions corresponding to the stored procedures.

when I then try to invoke data source method the function parameter is not available to select or populate.

am I doing something wrong?

thanks in advance for your help.

michael

Hi @michael,

Please send us at info@radzen.com your database schema (only schema, no data needed).

Sent schema along with apps

I created a very simple app that exhibits the issue

  1. database with a single stored procedure with one input parameter
  2. API app using the database as data source
  3. Client App using API as data source

let me know if there is anything else I can provide,
michael

Hi @michael,

I was able to run your apps locally and I've found what's going on. There is a Func sufix for the SP OData route generated by Radzen to avoid conflicts

When you run the app normally to hit directly the SQL database this suffix is taken into account and the OData call will work however when deploy to app and use it as a OData service Radzen will not know about the suffix and the OData call will fail. Possible workaround is to remove the Func sufix from the API app code:

In this case when imported as OData service everything will work normally:


I will see what we can do to support such scenario - Radzen .NET Core app with stored procedures used as OData service of another Radzen app.

Thanks for the explanation I'll give this a try.

I was able to get this working without modifications to the API.

What I was going wrong was confusing the Stored Procedure Entity with the Stored Procedure Function in the Client Application.

The Entity has five methods which I don't think provide any functionality since this is a stored procedure and you can't create, delete or update a record.
getSpTestDoubles, getSPTestDoublebyID, create..., delete... update...

The Function provides the necessary Input parameter.
spTestDoublesFunc

I'm still testing but I believe it is working.

michael