wire.data.StoredProcedure

Parameter Class

Properties

Methods

If a service provider supports executing stored procedures, it will set the allow.storedProcedure attribute to true.

const allowSprocs = accountService.allow().storedProcedure;

The following creates a new StoredProcedure object which will call the stored procedure spGetUsers in the data service with a parameter User equal to apeters.

const proc = wire.data.procedure("spGetUsers")
    .param("User", "apeters");

The following gets the stored procedure parameter object UserName.

const param = proc.getParam("UserName");

The following is a TypeScript example that executes the stored procedure in the data service.

...

const dataTable = await accountService.execAsync(proc);

Visit Creating Queries - Stored Procedures for more details and examples.

Last updated