call db procedure a with ResultSet [[param &1 = c], d,e, f,g,h,i], [column of ResultSet j = 1], default k,l dbAlias = b


Executes a stored procedure (SQL statement) a on the database being represented by alias b. Placeholders in the form of &parameterNumber being defined in the statement are replaced by the values of parameters c to i. Characters that are needed for a valid syntax need to be placed in the statement. The number of selected rows is limited to 1 automatically.

If the database returns a result set, the value of the column with number j is returned. Otherwise, k is returned.

Is a column being selected of type BLOB, the parameter m allows to specify if the data being selected should be encoded with Base64 before being added to the result list. If m is true, the function performs the encoding, false will leave the data unchanged. If there are no columns of type BLOB, the parameter has no effect.

Description of Parameters


Parameter

Description

a

SQL statement.

b

DB alias.

c

(optional) Input parameter &1.

d

(optional) Input parameter &2.

e

(optional) Input parameter &3.

f

(optional) Input parameter &4.

g

(optional) Input parameter &5.

h

(optional) Input parameter &6.

i

(optional) Input parameter &7.

j

(optional) Column from result set. Offset is 1.

k

Default value.

l

Encode Base64 blob content {true, false}.

Examples


Defined is a stored procedure GetAllProfiles(search), which returns the profile ID and profile name as result set.


Parameter a

CALL GetAllProfiles("&1")

CALL GetAllProfiles("&1")

CALL GetAllProfiles("&1")

Parameter b

testdb

testdb

testdb

Parameter c

demoprofile

demoprofile

demoprofile

Parameter d…i




Parameter j

2

1

1

Parameter k

error

error

error

Result

DemoProfile

6872263c:12fd93fea8f:-37a4.1feefd6229b797f1:6872263c:12fd93fea8f:-7ff8

error


Note: The examples above apply to a call in a MySQL database. If the executing database is an MSSQL, embed the actual statements in brackets, e.g. {CALL GetAllProfiles("&1")} (so put the SQL statement in curly brackets).