Doesn't seem to make much sense to create a table with data from the SQL query, and then change the model to an empty model.
Did you add any debug statement to your custom model to see if the isCellEditable(...) method is ever invoked?
If you need further help then you need to create a
SSCCE (Short, Self Contained, Compilable and Executable, Example Program), that demonstrates the incorrect behaviour.