i have this code in a button that updates the datawindow
rtn = dw_3.Update()
IF rtn = 1 THEN
COMMIT USING SQLCA;
MessageBox("Not Saved","Not Saved!")
ROLLBACK USING SQLCA;
Before "Not saved" shows up i get an error because i insert a number that already exists in the id column. id is the primary key. So how can i stop this error. i do not want to show up. I want something else that i define to show up in a messagebox.