1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access - Import From Tab Delimited Text File

Discussion in 'Business Applications' started by paul_carron, Dec 10, 2012.

Thread Status:
Not open for further replies.
  1. paul_carron

    paul_carron Thread Starter

    Joined:
    Oct 15, 2006
    Messages:
    207
    Hi,


    I'm using Access 2010 and wish to import a tab delimited text file containing the following data:

    Mobile Called Known ChargeGroup Date Time Duration TimeBand Cost Count
    01234567890 10987654321 654321 Mobile to Mobile Orange 29/10/2012 13:11 00:00:05 Daytime 0.020 1
    01234567890 10987654321 654321 Mobile to Mobile Orange 29/10/2012 13:13 00:00:02 Daytime 0.010 1
    01234567890 10987654321 654321 Mobile to Mobile Orange 29/10/2012 13:14 00:00:01 Daytime 0.010 1
    01234567890 10987654320 654320 Mobile to Mobile 3 29/10/2012 13:15 00:06:17 Daytime 1.010 1
    01234567890 10987654321 654321 Mobile to Mobile Orange 29/10/2012 13:21 00:00:04 Daytime 0.020 1

    To import I'm selecting External Data> Text file and working through the Wizard.

    When it completes with an error saying not all data could be imprted. The log table that is created has the following:

    Error Field Row
    Type Conversion Failure Mobile 1
    Type Conversion Failure Called 1
    Type Conversion Failure Mobile 2
    Type Conversion Failure Called 2
    Type Conversion Failure Mobile 3
    Type Conversion Failure Called 3
    Type Conversion Failure Mobile 4
    Type Conversion Failure Called 4
    Type Conversion Failure Mobile 5
    Type Conversion Failure Called 5

    I have done this many times before but it was always with Office 2003. Is it possible something has changed that I am unaware of?


    Any advice on how I can get around this? All other fields appear to import fine.


    Cheers

    Paul
     
  2. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    The most likely cause of the problem is with the way that Access handles importing the field types, it takes the first record and applies whatever type of value it finds to the field type in the Import Table, which means that when it finds a Number in the first line it assumes the data is going to be numbers. If however some records have text in them you get a type conversion error.
    You should be able to overcome this by importing in to a Table with all the fields set to Text and then correcting the data using the error list before setting the field types to the correct one.
    Alternatively if you can open the text file you could make the changes to that prior to importing.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1080328

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice