Alpha Video Training
Results 1 to 8 of 8

Thread: Importing Text File

  1. #1
    Member trackmanpete's Avatar
    Real Name
    Pete Schuder
    Join Date
    Sep 2005
    Location
    Mansfield, MA
    Posts
    592

    Default Importing Text File

    I am trying to import a text file into Alpha 5 v7 into an existing file with 14 fields. My import text file also has 14 fields. I get a message saying "error running Inport Operation. Invalid number of fields. Prior to that the program recognizes that I am trying to import 2291 records. What am I doing wrong? Thanks

  2. #2
    Member trackmanpete's Avatar
    Real Name
    Pete Schuder
    Join Date
    Sep 2005
    Location
    Mansfield, MA
    Posts
    592

    Default

    I continued my trial and error and finally was able to import by cutting back the number of fields down to 8 from the original 14. I don't know why this made a difference, so any input would be appreciated. Thanks.

  3. #3
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,669

    Default Memo field or greater than 255 characters

    I found that if import could not determine the field type or size correctly the import would fail, check if one of the other fields were of this nature. I had to ensure I checked the length and type of every field before imorting, it looked like the filed contents were be treated as a delimiter rather than field data.

  4. #4
    Member ChrisHawkes's Avatar
    Real Name
    Chris Hawkes
    Join Date
    Apr 2000
    Location
    Dorset, UK
    Posts
    295

    Default

    Quote Originally Posted by trackmanpete
    I am trying to import a text file into Alpha 5 v7 into an existing file with 14 fields. My import text file also has 14 fields. I get a message saying "error running Inport Operation. Invalid number of fields. Prior to that the program recognizes that I am trying to import 2291 records. What am I doing wrong? Thanks
    If your text file contains delimiters such as commas, you will need to make sure that there is the same quantity in each line (record).

    For example:-
    Code:
    "trackmanpete","alpha member","some other data","etc"
    Possible causes of errors not reported by Alpha can include:

    1) Where a delimiter is contained within a field e.g
    Code:
    "Flat 4, Wilmington Drive","Southampton","etc"
    Note the comma after flat 4 - This would cause an error for some reason.

    2) Where a quote mark is used within a field e.g
    Code:
    "Flat 4 Wilmington Drive","Baird"s Lane","etc"
    Note the quote mark in the word Baird's.

    This is just 2 examples, but there are many more.

    What I would do in this circumstance, is to open the text document into Excel and save the file as dBase IV file and then import that into Alpha. Also, this is a good way to look for odd characters and quantity of fields.

    Chris

  5. #5
    Member trackmanpete's Avatar
    Real Name
    Pete Schuder
    Join Date
    Sep 2005
    Location
    Mansfield, MA
    Posts
    592

    Default

    Thank you on the hint about the field size and type. I tried that tonight and the import worked fine.

  6. #6
    Alpha Software Employee AaronBBrown's Avatar
    Real Name
    Aaron Brown
    Join Date
    Feb 2001
    Location
    Waltham, MA
    Posts
    2,836

    Default

    trackmanpete,

    Please fill out the "Real Name" field in your user profile per this thread: http://msgboard.alphasoftware.com/al...ad.php?t=57225

    Thanks
    [FONT=Tahoma][SIZE=1][COLOR=Blue]Aaron Brown
    Alpha Software Development Team[/COLOR][/SIZE][/FONT]

  7. #7
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,957

    Default

    if you will import to a new table, instead of an existing table, and then append from the new to the existing, works better. Especially since what your importing from can change if you are getting it from some 3rd party.

  8. #8
    Member trackmanpete's Avatar
    Real Name
    Pete Schuder
    Join Date
    Sep 2005
    Location
    Mansfield, MA
    Posts
    592

    Default

    Yes, I tried that as my original work around. My importing is from another database (flat) that doesn't use field length and that may be why I ran into a problem. Thanks for your help. I am now doing the importing successfully.

Similar Threads

  1. importing text file
    By Duane Pederson in forum Alpha Five Version 6
    Replies: 4
    Last Post: 09-18-2004, 11:57 AM
  2. Importing data from text files
    By Betty Stein in forum Alpha Five Version 5
    Replies: 1
    Last Post: 07-07-2004, 02:14 PM
  3. Importing a Text Unicode file
    By WillieLucas in forum Alpha Five Version 5
    Replies: 2
    Last Post: 05-24-2004, 02:27 PM
  4. Importing text files
    By Will Stone in forum Alpha Five Version 5
    Replies: 7
    Last Post: 05-19-2003, 02:35 PM
  5. RE: Importing from text Files
    By Ian Prime in forum Alpha Five Version 4
    Replies: 1
    Last Post: 04-14-2002, 09:52 AM

Bookmarks

Posting Permissions

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