wise-coders / dbf-jdbc-driver

DBF & FoxPro JDBC Driver | DbSchema DBF Designer
https://dbschema.com/databases/dbf-management-gui.html
Other
23 stars 15 forks source link

No support for writting TIMESTAMP #8

Open hectorsipe opened 1 year ago

hectorsipe commented 1 year ago

Hi, I get this error when I try to save the database:

java.lang.IllegalArgumentException: No support for writting TIMESTAMP at com.linuxense.javadbf.DBFField.setType(DBFField.java:431) at com.wisecoders.dbschema.dbf.schema.Table.createDBFField(Table.java:48) at com.wisecoders.dbschema.dbf.io.H2Writer.(H2Writer.java:38) at com.wisecoders.dbschema.dbf.H2Connection.saveDbf(H2Connection.java:154) at com.wisecoders.dbschema.dbf.H2Connection.access$100(H2Connection.java:38) at com.wisecoders.dbschema.dbf.H2Connection$StatementProxy.invoke(H2Connection.java:90) at jdk.proxy3/jdk.proxy3.$Proxy137.execute(Unknown Source)

I thought that it was a problem with the insert clauses I made, but it occurs although saving without updating the database.

wise-coders commented 1 year ago

Could you please try to use the latest version of the driver? The dependency 'com.github.albfernandez:javadbf:1.14.0' seems to be an older version in your case.

hectorsipe commented 1 year ago

Thank you for your attention. I downloaded the driver from this link: https://dbschema.com/jdbc-drivers/DBFJdbcDriver.zip Isn't this the latest? It's in the readme.md of this repository.

wise-coders commented 1 year ago

Yes, this is the correct location. To be sure, we uploaded the latest right now again. Please try one more time.

hectorsipe commented 1 year ago

I keep getting the same error. The latest version of the driver is 1.14.0, according to the repository 'com.github.albfernandez:javadbf' and it's the same version included in your driver. Is there an alternative to save only some specific tables where there are not timestamp fields. The tables I'm updating doesn't contain this type.

wise-coders commented 1 year ago

I added a fix. A new library is deployed. Timestamps will be saved as text.

case "timestamp":                if ( DBFDataType.TIMESTAMP.isWriteSupported() ) {                    field.setType( DBFDataType.TIMESTAMP );                } else {                    field.setType( DBFDataType.CHARACTER);                    field.setLength( 256 );                }