|
wb_psql_out_param_count | 'Prepared' SQL Functions | wb_psql_out_param_length |
This function reads and returns the value (or part) of an OUT or INOUT parameter of the specified index out_param_index. An SQL statement with the psql identifier must have already been executed. You may only call this function after a successful call to the wb_psql_execute function. The whole value will be read if the out_param_offset or out_param_size are not specified, or if the out_param_offset parameter is 0 and the out_param_size is longer or equal to the OUT parameter length the function reads.
The function returns the value (or part) of an OUT or INOUT parameter of a SQL statement if successful, otherwise FALSE.
Send an IN parameter value to the SQL Server, execute the statement, get the count of OUT parameters, get the length of an OUT parameter and read the OUT parameter value.
$psql=wb_psql_prepare($connection,"SELECT name INTO ? FROM Person WHERE ID=?"); wb_psql_send_param($psql, 1 /*second parameter*/, 123 /*parameter value*/); wb_psql_execute($psql); echo "count of the OUT parameter: ".wb_psql_out_param_count($psql)."\n"; echo "length of the first OUT parameter: ".wb_psql_out_param_length($psql,0)."\n"; echo "value of the first OUT parameter: ".wb_psql_get_out_param($psql,0)."\n";
wb_psql_out_param_count | 'Prepared' SQL Functions | wb_psql_out_param_length |