$ 0 0 the error is in the order base refnum assign variable before insert the data in the table but return null when i search the info. i run the query in toad and ist correct.