Building an import routine

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi

I am trying to build an import routine to handle the import of data from an .
xls file. I am interested to hear feedback from people who have already
tackled similar challenges. I'm not necessarily looking for full answers
(whilst it would be nice it's not for you to do my work) but rather hints,
tips, and considerations.

So far I have written the code to import the data into a new import table.
Once imported I then have added a coupled of extra fields. One of which is
'Errors' which is a memo field. From here I wish to run a number of checks on
the data and where they fail add a pointer to the memo field. Later in the
procedure records that have a null/empty 'Error' field will be imported and
the rest reported back to the user with the error description.

Checks to perform:
1) Remove empty records (empty rows are sometimes pulled in from Excel).
I did consider counting number of fields in the table and for each record if
the value is null/empty incrementing an integer. If the final value of the
integer equals the field count then delete the record. Any better suggestions?


2) Check field names are valid (against table that data will be appended to)
I?m considering creating an array of field names from the destination table,
and then checking all field names against this array?.but haven?t used arrays
before!

3) Possibly change any user friendly fieldnames/headings imported from the
worksheet to match those in the destination tables. I should be OK with this.

4) Check compulsory fields have been completed. I should be ok on this.

5) Check data confirms to any constraints/validation. I should be ok on this.

6) Check that the data will go to destination table.
Preferably before running the final append. Any ideas welcome?

7) Trap error/acknowledge whether append is successful.
Any ideas welcome?

All thoughts welcome.

Thanks.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-externaldata/200602/1
.



Relevant Pages

  • Re: Question about graph theroy--Help!
    ... the source and destination may be the same node. ... if it has visited that node before (loop). ... A data structure for a path would have: ... - fixed array of 254 bytes ...
    (comp.soft-sys.matlab)
  • Re: Run append query from another database
    ... In order to suppress the display of the action query confirmation messages, ... you can put a SetWarnings/No action in the macro, ... but any records that don't exist in the destination ... and "Yes" to append the rows. ...
    (microsoft.public.access.macros)
  • Re: Cost of calling a standard library function
    ... > array which should be supplied as an address for both source and ... > destination. ... Please dont start that again? ... RosAsm support INFINITE ways to structure data. ...
    (alt.lang.asm)
  • Re: append command
    ... Beside the SQL command you could use APPEN FROM like this ... destination but befor the record cound is updated and the append process ...
    (microsoft.public.fox.helpwanted)
  • Criteria in append querie
    ... I want to append only non existing ClientID fields into the ... Client ID is not a primairy field because it is a import file from ... Klant_copy= destination table ...
    (microsoft.public.access.queries)