update old datasets; exceptions

My first question. After I make changes on a selected dataset from a
database i want to overwrite the old values with the new one. I want to use
a sql statement to do this. Can anybody tell me how to do this?

Here is my second question. The value of an edit field is changed into a
Float or an integer. This is of course no problem, but there are exceptions
if the value is not a float or an integer. How can I handle this exeption.