Hi All you experts!
I am trying to import to Access few XML files, containing, roughly, products, ingredients, and prices. The products and ingredients data are linked by products Primary key - a number up to 18 digits long. In the XSD file, the field is declared as an Integer type.
While in products table the field is converted to String, and all data seems to be imported, in ingredients table the field stays a Long, and large numbers are not imported.
Changing the field type in xsd to String still creates in the table a Long type field.
I tried to first create the field as a string type, then import:
some of the data (some up to 17 digits long) gets imported, some 45% of the data is found in the IMPORT ERRORS table, with error message (translated from Hebrew): The decimal field's precision is too small to accept the numerical value you were trying to add.
how would I Import the numbers as a String?
I am trying to import to Access few XML files, containing, roughly, products, ingredients, and prices. The products and ingredients data are linked by products Primary key - a number up to 18 digits long. In the XSD file, the field is declared as an Integer type.
While in products table the field is converted to String, and all data seems to be imported, in ingredients table the field stays a Long, and large numbers are not imported.
Changing the field type in xsd to String still creates in the table a Long type field.
I tried to first create the field as a string type, then import:
Code:
[INDENT]App.NewCurrentDatabase FileNameMDB, acNewDatabaseFormatAccess2002
App.ImportXML FilePaths(i), acStructureOnly
App.CloseCurrentDatabase
Set dbs = OpenDatabase(FileNameMDB)
' ChangeFieldType A sub I created, works fine
ChangeFieldType dbs, "ING", "ISID", dbText, 50
dbs.Close: Set dbs = Nothing
App.OpenCurrentDatabase FileNameMDB
App.ImportXML FilePaths(i), acAppendData
App.CloseCurrentDatabase
[/INDENT]
how would I Import the numbers as a String?