I have an application that uses AJAX liberally. I have several places where one database column is updated for a record that the user is actively editing.
So far, I have created separate stored procedures for each AJAX action ... so I have stored procedures UPDATE_NAME, UPDATE_ADDRESS, UPDATE_PHONE.
I'm just wondering if there is a better way to continue using stored procedures, but not creating them for each column.
I would like to avoid reflecting the row parameter that indicates the columns, if possible. That is, I know that I can have an UPDATE_COLUMN procedure that takes a column name as one of its parameters. This view gives me freedom, but if this is the only way to do this, I can give him a few more thoughts. But not all columns have the same data type, so this does not look like a silver bullet.
source
share