Updating database with values in properties file in Java -


I have a property file ( .properties ) which require some values ​​to be updated In database.

I can specify the key with delimiter '#' like

  table_name # column_name # where_clause_column # where_value = value_to_be_updated  

An update will occur above (the argument to create an updated statement is written by me by java)

  update table_name set column_name = value_to_be_updated where where_clause_column = where_value  

This is working fine. I want to know if there is a right way to go about it or is there any better way to do this? The Africa?

Attention enjoys pleasure .. it would be better to use batch updates to see the display point.

  readyStatement.setString (1, "value"); // will be called multiple times (according to your query parameters) readyStatement.addBatch (); // will be asked multiple times (one copy per query) ready install Exactbatch (); // will be called only once (one per batch)  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -