开发者

How to find the primary key in dbf file?

开发者 https://www.devze.com 2023-02-11 06:57 出处:网络
I\'ve a Problem finding primary key in dbf file. I\'m using dbfviewer to view contents of the file but I\'m unable to f开发者_JAVA技巧ind out the primary key

I've a Problem finding primary key in dbf file.

I'm using dbfviewer to view contents of the file but I'm unable to f开发者_JAVA技巧ind out the primary key

many of the records are unreadable or may be encrypted.

e.g _2WI0ZEK7K , _2WI10EHT5 , _2WI0YA8HF & so on.

I'm working on project which connects my sqlserver database to the dbf file.

but for relationship in between I need a primary key.


You can check if the DBF file is encrypted by checking the flag at offset 0x0F (it should be 0x00 for not encrypted or 0x01 for encrypted)

DBF doesn't explicitly define a column as being a key (primary nor foreign) - the closest you can find is when the datatype flag reads + which means that column is auto numbered. I've not got any files to hand with that column type, but I seem to remember they are stored as a 4 byte little endian integer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号