From 797c0a377d3ebda014aae533769b6bb9eddbbeeb Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Fri, 18 Mar 2011 03:53:25 +0000 Subject: [PATCH] add additional (unknown) flag when writing indexes git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@528 f203690c-595d-4dc9-a70b-905162fa7fd2 --- src/java/com/healthmarketscience/jackcess/IndexBuilder.java | 5 +++-- src/java/com/healthmarketscience/jackcess/IndexData.java | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/java/com/healthmarketscience/jackcess/IndexBuilder.java b/src/java/com/healthmarketscience/jackcess/IndexBuilder.java index 4799abf..11fa556 100644 --- a/src/java/com/healthmarketscience/jackcess/IndexBuilder.java +++ b/src/java/com/healthmarketscience/jackcess/IndexBuilder.java @@ -38,8 +38,9 @@ public class IndexBuilder private String _name; /** the type of the index */ private byte _type; - /** additional index flags */ - private byte _flags; + /** additional index flags (UNKNOWN_INDEX_FLAG always seems to be set in + access 2000+) */ + private byte _flags = IndexData.UNKNOWN_INDEX_FLAG; /** the names and orderings of the indexed columns */ private final List _columns = new ArrayList(); diff --git a/src/java/com/healthmarketscience/jackcess/IndexData.java b/src/java/com/healthmarketscience/jackcess/IndexData.java index 4aed9e1..fa9d020 100644 --- a/src/java/com/healthmarketscience/jackcess/IndexData.java +++ b/src/java/com/healthmarketscience/jackcess/IndexData.java @@ -84,6 +84,8 @@ public abstract class IndexData { static final byte UNIQUE_INDEX_FLAG = (byte)0x01; static final byte IGNORE_NULLS_INDEX_FLAG = (byte)0x02; + static final byte SPECIAL_INDEX_FLAG = (byte)0x08; // set on MSysACEs and MSysAccessObjects indexes, purpose unknown + static final byte UNKNOWN_INDEX_FLAG = (byte)0x80; // always seems to be set on indexes in access 2000+ private static final int MAGIC_INDEX_NUMBER = 1923; -- 2.39.5