Closed edgarjoao closed 1 year ago
Hi
Yes, you can use getType method in DBFField
sample
DBFReader reader = null;
try {
// create a DBFReader object
reader = new DBFReader(new FileInputStream(args[0]));
int numberOfFields = reader.getFieldCount();
for (int i = 0; i < numberOfFields; i++) {
DBFField field = reader.getField(i);
if (field.getType() == DBFDataType.AUTOINCREMENT) {
System.out.println(field.getName() + " IS AUTOINCREMENT FIELD");
}
}
} catch (DBFException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
finally {
DBFUtils.close(reader);
}
Nice, thank you @albfernandez
Hi there, Is there a way to identify if a column is auto incremental?