Java Data Processor with DB issue

Hi,
I am using java connector to fetch and update the db. when user loading the index.jsp page in the connector if block is executing and data is fetching properly.
where as when user edit the grid, I am expecting to update the DB through the java connector.
In java connector else block is firing but DB is not updating with the user values.

Please help me to resolve the issue.

In my Index.jsp page I am creating the grid as below:
function buildGrid() {
myGrid.setImagePath(“dhtmlx/codebase/imgs/dhxgrid_skyblue/”);
myGrid.setColumnIds(“P_Id,LastName,FirstName,Address,City”);
myGrid.setHeader(“P_Id,Last Name,First Name,Address,City Name”);
myGrid.setColTypes(“ro,ed,ed,ed,ed”);
myGrid.setInitWidthsP(“15,15,15,15”);
myGrid.setColAlign(“center,center,center,center”);
myGrid.init();

            myGrid.clearAndLoad("PersonsGridConnector");
            // myGrid.showView("CodesetGridView");//.setActive();

            myDataProcessor = new dataProcessor("PersonsGridConnector");
            myDataProcessor.setTransactionMode("GET", false);
            myDataProcessor.init(myGrid); // link dataprocessor to the grid

        }

My Connector class look like this
dbType = DBType.MSSQL;
Class.forName(“com.microsoft.sqlserver.jdbc.SQLServerDriver”);
con = java.sql.DriverManager.getConnection(“jdbc:sqlserver://localhost:1433;databaseName=abc”, “SA”, “password”);
GridConnector customGridConnectorObj = new GridConnector(con, dbType);
customGridConnectorObj.servlet(req, res);
if(customGridConnectorObj.is_select_mode()){
customGridConnectorObj.render_sql(“select P_Id,LastName,FirstName,Address,City from Persons”, “P_Id”, fieldsToDisplay);
}else{
((DBDataWrapper)customGridConnectorObj.sql).attach( OperationType.Delete ,“update Persons set LastName='updated’where P_Id=1”);
customGridConnectorObj.render_table(“Persons”, “P_Id”, fieldsToDisplay);

CREATE TABLE Persons
(
P_Id int NOT NULL PRIMARY KEY,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255)
)

Please try to enable logs, and check their content
docs.dhtmlx.com/connector__java__errors.html

GridConnector customGridConnectorObj = new GridConnector(con, dbType);
customGridConnectorObj.enable_log(“some/path/log.txt”);

Be sure to provide a path to a folder where java server has a write access.