foxpro - Can't update a dbf from Java using dBase Driver -


hello have dbf file want update everytime try run update statement system says that index not found using microsoft dbase driver.

this code:

class.forname("sun.jdbc.odbc.jdbcodbcdriver");         string connstring="jdbc:odbc:driver={microsoft dbase driver (*.dbf)};defaultdir=path";         connection connection=drivermanager.getconnection(connstring);           string sql;          calendar cal = calendar.getinstance();         cal.gettime();         simpledateformat sdf = new simpledateformat("hh:mm:ss");           string _time =sdf.format(cal.gettime());//adding time of set product.            sql="update [mesas] set per_mez="+args[2]+", hor_mez='"+_time+"', mes_mez='"+args[2]+"' cod_mez='m01'";      statement query = connection.createstatement();     query.execute(sql); 

try using executeupdate instead of execute. there strange problems execute while doing table update.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -