Execute stored procedure to change password

Hello,

How do you call/execute an internal SQL Anywhere database stored procedure in Scriptcase? I need to allow user to change password in SQL Anywhere database using the sp_password procedure passing old password, new password and user id.

Thanks in advance
Regards
Lisa

Hi.
I don’t know about SQL Anywhere but I’m still sharing how I do it with MySql (MariaDB). It may help you.
$sql = “CALL sp_do_something(‘my_str_param’)”;

sc_lookup(dataset, $sql);
if (false == {dataset})
{
	sc_error_message({lang_msg_company_redirect_error});
}
elseif (empty({dataset})) // or also "({dataset}->EOF)"
{
	sc_error_message({lang_msg_company_redirect_error});
}
else
{ 
	$localVar = {dataset[0][0]};
}

Hi jefch,
Thank you for your response. It lead me in the right direction. Since I am using ODBC connection the following code works for me in a blank script.

$sql = “Execute sp_password $pass, $spswd”;
$result=odbc_exec($conn,$sql);

Thanks again!

Perfect. Glad to help. Have a great day.