OleDB always add one more digit to DBF numeric fields when we create them. A command like this:
CREATE TABLE [file1.DBF] ( [MY_FIELD] NUMERIC(1,0) NULL)
will create a field that can contains 2 digits (or one digit and a minus sign). What's funny is that I can ask for a length of zero like this NUMERIC(0,0)
and it's going to create a field with a length of 1.
I couldn't find any documentation regarding this behavior.
Is it specific to the use of oleDB to create DBF or the same can happen with other DB?
Is the extra digit added by oleDB only to handle the minus sign?
Is this behavior consistent? I mean, can I just subtract one to the width when I create the table?
Edit: This question has pretty much been answered here: http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/af245580-8897-4608-8fa0-f00286d37324?prof=required