Stored procedures with output and return parameters
SQL4automation newly supports procedures with output and return parameters. To tell SQL4automation that return or output parameters are used, placeholders are used in the SQL string. @@RetParam@@ is used for return parameters and @@OutParam@@ is used for output parameters.
Please note that Microsoft SQL Server always returns an integer as return parameter for stored procedures. This must obligatorily be included in the SQL string if an SQL string contains output parameters.
The return and output parameters are returned in the same order as in the SQL query. The first parameter is the return parameter, the second the output parameter. This query used the default database driver.
If the SQLAPI++ driver is used, all parameters are always returned:
Stored procedures programmed in Visual Studio (SQLCLR)
There is the possibility to create stored procedures with Visual Studio. (SQLCLR). This makes the SQL Server very powerful, as these procedures not only request data from the database, but can also execute C# code. For example, like this it is possible to transfer files via FTP or to establish a SOAP communication. In order to execute SQLCLR functions, the SQLAPI interface must be used in any case. If the procedure contains output parameters they must be addressed with a special syntax. Instead of @@RetParam@@ and @@OutputParam@@, @@<data type>@@ is used. For example: @@INT@@
