If you follow the scheme I explained in answer to your other question, Need to execute the script when it entered the perspective page - #2 by Transistor, your corrected code could be written as,
query = """UPDATE drawing_master
SET name = ?, drawingno = ?,product = ?
WHERE id = ?"""
values = [self.custom.name,
self.custom.drawingno,
self.custom.product,
self.view.params.row_id
]
system.db.runPrepUpdate(query, values)
Which would be more readable and more robust?