I am using ADO (‘Microsoft ActiveX Data Objects 2.7 Library’) to import data into a table within Attain. I have no problem importing Char type fields from the dbf file, but if they are a type of Number I get an error telling me that Navision can not only handle data types of VT_VOID, VT_12, etc… Does any one know how to make this happen? I have tried using the Type Properties of the fldADO.Filed.Type but can’t find any help and am running into various issues. This is what I do to read the data and like I said it works fine Char type fields. ReadData() WHILE NOT dBaseRS.EOF AND NOT dBaseRS.BOF DO BEGIN dBaseFields := dBaseRS.Fields(); dBaseField := dBaseFields.Item(‘ITEM’); ItemNo := dBaseField.Value(); dBaseField := dBaseFields.Item(‘DESC’); Desc := dBaseField.Value(); dBaseField := dBaseFields.Item(‘ONHAND’); QtyOH := dBaseField.Value(); InsertRecord; dBaseRS.MoveNext; END; Please help…
You can try with: evaluate(QtyOH, format(dBaseField.Value());
Thanks for the suggestion Aqustin. I tried something very much like that and got a different error. It says “You can not enter ‘[]’ in a Decimal.” And the character is a square box not []…