Howdy all,
A new installment in what is becoming a saga, and a badge of shame for
myself.
A few days ago in another thread I put up a couple of basic routines to
scrub a line of data from a CSV and use this to load the scrubbed line
to a base file. That was for Dinabnu's use. Still trying to cleaning
import his data, exported from MSA under windows, into Base under Linux.
It is failing, and doing so in such a way as to have me somewhat stumped.
Instead of showing all the code just pseudo code and maybe it will
trigger someone to see my mistake.
The exported CSV file has ~3,600 lines.
The basic loader looks like this.
sub main
Get a connection to the odb file
Create target_table ( This table duplicates the structure in MS Access. it has
been checked and re-checked it is correct )
get input_file_name
Open the input_file_name for input
Create error_file for output
set an error handler OnInsertError
For each line in input file
scrub_line( input )
array = burstline( input )
insertRecord( connection, array )
next
close files
close connection
exit main
OnInsertError:
Write input line to error file
resume next
end main
sub insertrecord
create prepared statement ( replacement parameters for all fields )
update fields
executeupdate
end sub
OK, now at the end of a run the table has 916 records and the error file
has 3 lines.
No error messages displayed to screen, so I assume no unhandled errors
occurred.
What happened to the other ~2,500 records.
In more curious if he reruns the loader and instead of using the name of
the CSV export file, he uses the name of the error file created in the
first pass. The 3 lines are loaded to the table with out a problem?
Anyone want to venture a guess as to what is going on?
Drew
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]