Results 1 to 2 of 2
  1. #1
    hcorvallis is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1

    Importing numeric fields with null values from XML

    I'm trying to import a data set from XML and have run into a bit of a problem. I have the tables all set up in an Access 2010 database. One table has a field that is a long integer field and is not required. So far so good. When I import the records, they all import, but I get records in the ImportErrors table saying "Supplied data does not match the datatype of field 'myfield'" for every record where the column myfield has a null. It is represented in the xml file as <myfield />. I don't get errors for fields in cases where a text field is null, just for the numeric (long integer) fields.



    If I were the one who was going to be running the import in the future, I wouldn't worry about it, after all, the records actually look like I expect them to look. However other people will be running it and I would prefer that it not look like there's a problem with the import. Any ideas?

  2. #2
    Stingaway is offline Efficiency Junkie
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    The deep south. Keep going until you hit water basically.
    Posts
    224
    I would suggest a pre-processor that reads the xml file to find nulls in the myfield area and populates/replaces them with a space or a non-null character. You can then run the cleaned up (processed) file through the import routine and theoretically it should take care of the problem.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Importing Excel file. (2 non numeric values won't import)
    By Amerigo in forum Import/Export Data
    Replies: 3
    Last Post: 05-20-2011, 11:31 AM
  2. Updating Numeric Values
    By dssrun in forum Queries
    Replies: 9
    Last Post: 11-24-2010, 11:20 AM
  3. Creating a Flat File with Signed Numeric Data Fields
    By two_smooth in forum Database Design
    Replies: 2
    Last Post: 10-27-2010, 08:31 AM
  4. Replies: 5
    Last Post: 03-20-2010, 08:30 AM
  5. Numeric value out of range (null)
    By PPCMIS2009 in forum Queries
    Replies: 0
    Last Post: 02-03-2009, 11:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums