Page 1 of 1

Calling a Stored Procedure

PostPosted: Mon Mar 31, 2014 8:26 am
by ian
In the attached example a SQL Server Read Object can be used to run a Stored Procedure. The example runs against the Chinook sample database developed by Luis Rocha.

Three attachments are provided:
  • SQL scripts to create the Chinook database. These are provided with a small command file. The database is provided in two formats, one with auto incrementing primary keys and one without.
  • A script to add a Stored Procedure.
  • A sample DataSlave Map that calls the above Stored Procedure.
First create the Chinook database using the command file, then add the Stored Procedure using the provided script, then run the DataSlave Map.

The Map assumes Windows integrated security to a local SQLEXPRESS database. This can be adjusted if necessary. The Map illustrates how to call the Stored Procedure with a hard coded search parameter and also using Map and Transform .NET Scripts to pass a parameter.

Thanks to Luis for the Chinook database.
(375.08 KiB) Downloaded 2019 times
(418 Bytes) Downloaded 1925 times
(4.26 KiB) Downloaded 1748 times