stored procedure not executing

I am trying to execute the following code, but its not working:

var iArray = new Array(2);
var argArray = new Array(2);
iArray[0] = 1;
iArray[1] = 1;
argArray[0] = id_addresses_mailing;
argArray[1] = id_people;
databaseManager.executeStoredProcedure(controller.getServerName(),‘spDelAddMail’,argArray,iArray,0)

It is supposed to execute a stored procedure which deletes an address record. It works fine when executed directly in Sybase. I checked the arrays and all of the correct values are being set.

What am I doing wrong?

can you send me the stored proc. you use with this script?

Here is the SQL to create/alter the procedure.

ALTER PROCEDURE “DBA”.“spDelAddMail”(@id_addresses_mailing integer, @id_people integer) As

Delete from addresses_mailing where id_addresses_mailing = @id_addresses_mailing and id_people = @id_people

At first I thought maybe the record was being deleted but I was just not seeing it in Servoy. But I checked in the database and the record was still there.

By the way, if I do change data in the DB directly, on a record that is in the foundset in Servoy, what do I need to do to refresh the foundset?

Thanks for your help!

youre call is wrong:

it should be:

var iArray = new Array(2); 
var argArray = new Array(2); 
iArray[0] = 0; 
iArray[1] = 0; 
argArray[0] = 1; 
argArray[1] = 3; 
databaseManager.executeStoredProcedure('user_data','{call spDelAddMail(?,?)}',argArray,iArray,0)

First you have to use 0 as input for the iArray (1 == output params)

Also you have to use the complete call how it supposed to be used in java:
{call spDelAddMail(?,?)}

Excellent!

That worked. Thanks!