Hi there,
João, thank you for your input. I already changed to the inputs accordingly

But now i have this error:
Cannot insert duplicate key row in object 'dbo.OSUSR_IY5_RUBRICAORCAMENTAL1' with unique index 'OSIDX_OSUSR_IY5_RUBRICAORCAMENTAL1_4CODE'. The duplicate key value is ().
The statement has been terminated.
I need to say that on both DB i created an Index so the code value must be unique


My question is: If i'm saving into RubricaGeral DB, why says is the error saying the problem is for RubricaOrcamental DB?
In the future, i will try to implement the code automatically by the system and not manually as it is.
ASMA: Can you please explain a little better (i'm still doing my first steps here :\ )