Export data from Navision in DBF format

ddanicaddanica Member Posts: 10
Hi!
I must create a dbf file with a custom structure and export data from Navision in that file. I create the file with automation variabile and automation server Microsoft ActiveX Data Objects 6.0. My problem is: the lenght of fields of numeric type is not the lenght that I specified, is the default lenght of the numeric type (20). Can anybody help me whith this problem?
The code is the folowing:
Variable:
DBFConnect Automation 'Microsoft ActiveX Data Objects 6.0 Library'.Connection
Path Text 250

code:

Path := 'd:\';
CREATE(DBFConnect);
DBFConnect.Open('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + Path + ';Extended Properties=DBASE IV;');
DBFConnect.Execute('Create Table Persons (Name char(50), City char(20), Phone char(20), Value numeric(5,2))');
DBFConnect.Close;

In this case, the lenght of "Value" is 20 with 5 decimals, even if I set the lenght 5 with 2 decimals. This thing I see when open this file with Fox Pro.
Sign In or Register to comment.