Alpha Video Training
Results 1 to 1 of 1

Thread: CSV Import Routine for Desktop

  1. #1
    Member
    Real Name
    Paul Verboom
    Join Date
    Apr 2006
    Location
    Halifax, Nova Scotia, Canada
    Posts
    144

    Default CSV Import Routine for Desktop

    I've seen several questions on the Message board relating to CSV imports, so I figured I would share the CSV import routines I wrote some time ago.

    These routines have the following advantages over the CSV import routines that are part of Alpha5.

    - Imports can be defined by the end-user in the runtime.
    - If there is an error in one of the input lines, the routine will report the offending line and continue the import. The Alpha5 import will abort and not indicate what line has the error.
    - The import configuration is tested against a selected number of sample lines before the import is started.
    - Any issue is reported and remains visible in the import configuration screen.
    - Import configurations can be saved and reused.
    - CSV values can be appended directly to existing tables.
    - Duplicates can be removed.
    - Values can be imported to memo fields

    The routine has the following limitations.
    - May be more work to implement.
    - A little slower than the built-in A5 routines. There is a sample file of 1000 values that you can use to gauge its speed.
    - This was part of a larger package so it requires a fair number of support routines.
    - The first line must contain field names.
    - Only Commas can be used as field separators
    - Quoting values are optional but must be done if the values themselves contain commas.
    - Values cannot contain carriage returns and/or line-feeds. The Import tool will not properly process files formatted in this way. It will interpret the carriage-return line-feed as the end of record/line even if it is inside quotes. Unfortunately Excel will produce files in this format.



    Attached to this message is a sample application with a single table and form that demonstrates these CSV import routines.

    CSVimport.jpg
    CSVloads.zip
    Last edited by pboomwork; 01-05-2020 at 09:20 PM.

Similar Threads

  1. daily routine
    By moiola in forum Application Server Version 9 - Web/Browser Applications
    Replies: 14
    Last Post: 06-13-2012, 05:14 PM
  2. desktop routine to create a web user
    By irwincohen in forum Application Server Version 9 - Web/Browser Applications
    Replies: 8
    Last Post: 10-01-2010, 10:57 AM
  3. Import and Store Images on a Desktop Folder
    By johnsocm in forum Alpha Five Version 9 - Desktop Applications
    Replies: 10
    Last Post: 06-05-2009, 11:07 AM
  4. import users/group import Desktop versus WAS
    By bea2701 in forum Application Server Version 9 - Web/Browser Applications
    Replies: 1
    Last Post: 05-07-2009, 07:46 AM
  5. How To Import Data From Web Application Into Desktop Application
    By edocx in forum Application Server Version 8
    Replies: 6
    Last Post: 03-14-2008, 10:44 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
  •