dbf-jdbc-driver icon indicating copy to clipboard operation
dbf-jdbc-driver copied to clipboard

No support for writting TIMESTAMP

Open hectorsipe opened this issue 2 years ago • 5 comments

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.

hectorsipe avatar Mar 28 '23 14:03 hectorsipe

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.

dbschema-pro avatar Mar 30 '23 07:03 dbschema-pro

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.

hectorsipe avatar Mar 30 '23 08:03 hectorsipe

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

dbschema-pro avatar Mar 30 '23 10:03 dbschema-pro

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.

hectorsipe avatar Mar 31 '23 06:03 hectorsipe

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 );                }

dbschema-pro avatar Mar 31 '23 08:03 dbschema-pro