Thanks Arnd!!
I changed the code as you suggested and change my int variables to long.
I am getting "Execute Failed".
Does my stored procedure look like it should work?
Is there some other way to test it?
Paul
long rate_rank
string sp_id
long a_identity
long b_identity
long vehicle_type
sp_id = 'F10600'
a_identity = 23864
b_identity = 4018
vehicle_type = 1
DECLARE ft_sp_RankAffiliateRate2_pb procedure for ft_sp_RankAffiliateRate2
@sp_id = :sp_id,
@a_identity = :a_identity
@b_identity = :b_identity
@vehicle_type = :vehicle_type
@rate_rank = :rate_rank OUTPUT;
IF SQLCA.SQLCode <> 0 THEN
MessageBox ( "Error", "DECLARE failed" )
RETURN -1
END IF
execute ft_sp_RankAffiliateRate2_pb;
DO WHILE SQLCA.SQLCODE = 0
FETCH ft_sp_RankAffiliateRate2_pb
INTO :rate_rank;
LOOP
IF ( SQLCA.SQLCode <> 0 ) and ( SQLCA.SQLCode <> 100 ) THEN
MessageBox ( "Error", "EXECUTE failed" )
RETURN -1
END IF
close ft_sp_RankAffiliateRate2_pb;
messagebox("Rate Rank","Rate Rank for " + sp_id + " is: " + string(rate_rank))