Importing XML file into Access 2003

Nevy

Registered User.
Local time
Today, 00:20
Joined
May 31, 2005
Messages
31
Hi, I have an xml which fields of text and some of numbers.

When I do: File --> Get External Data --> Import; I'm able to import the file.

The problem is that not all the data is entered in the fields. The colums containing the text are excluded.

While importing, I did choose the option "Structure and Data", so it should work.

Any suggestions on to why it is doing that?

Thanks.
 
When doing imports into Access, the first row of data must be of the data type of all possible values for that field. Access reads the first data row and then assumes the rest of the data will match this. So, for instance, if you have a column named InvoiceNum and the first row's value is 54321, the Access creates the field with a numeric data type. Then 600 rows later an InvoiceNum of 54A5G comes along, it won't read it in because it will not fit into the numeric data type. What I do is to create a dummy record for the first row which holds values for the data type I wish Access to cast. If I want numeric, I use 999.99, if I want text, I use AAA, if I want date, I use 9/9/99. Then after I import, I go back in and delete my dummy record.

Another way is to create the table first with the data types you want, then append the data to the table.
 
Ok, thanks.
 

Users who are viewing this thread

Back
Top Bottom