您好,我有一个要更新的 dbf 文件,但每次我尝试运行更新语句时,系统都会说that the Index is not found
正在使用Microsoft dBase driver
.
这是代码:
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 the Time of set the product.
sql="UPDATE [MESAS] SET PER_MEZ="+args[2]+", HOR_MEZ='"+_time+"', MES_MEZ='"+args[2]+"' WHERE COD_MEZ='M01'";
Statement query = connection.createStatement();
query.execute(sql);