Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004

    Exclamation Unanswered: Losing data on import

    I am importing from a text file to a table by creating a new table with a spec. However on import I lose data on some of the lines within the text file.

    The lines are of different length depending on the data within the line.

    Any advice on why this happening?

  2. #2
    Join Date
    Jul 2003
    What is the delimiter in the text file? Is it possible that some lines contain an extra delimiter? ie: A product description with a comma in it.

    Does Access generate an error table telling you which lines it ignored, or does it just skip chunks of data?
    Inspiration Through Fermentation

  3. #3
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    At a rough guess you have gone down the route of using an import filter rather than writign a VB import function so any variation between what you expect and what you get is being binned by the import module.

    Are you getting any import errors?

    Can you indentify what records are not being brought through, and of so what is common between those records

    do you have any referential integrity checking on the new table, if so are records beiung rejected on those grounds

    are there any non standard records in you import file, ie those that don't match the criteria sepcified in your earlier post (ie different number of fields, different field types)

    When you import a file using a file spec Access makes a gues as to what data type the column in the table should be, it occasionally can make the wrong guess (ans for example seelct string/text as the data type when in reality it should be numeric, equally it can occasionally guess the wrong numeric datatype. All of these are good reasons to use a homebuilt function to do the import.

    For the exercise you are doing I would strongly reccomend that you develop a VB function to cater for this, and incorporate code that should be able to tell you why it is rejecting records.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts