
09-15-2000, 12:09 PM
|
|
|
Re: Deleting Records?
|
First Problem: How do you prevent a record from being written when the salary is 0.
This one is easy. Simply move the line...
Put #2, intIndex, udtoutputrecord
inside of the block-if statement. That is to say...
If salary is not 0, then write the record to file.
The reason that you get the previous record written twice when encountering a record with a 0 salary is that
1) as you code stands, you write to file in every iteration of the loop, and
2) because the code to change the output record to the current input record is contained within the block-if, that code does not get executed when the salary is 0, and, thus the previous record is the data stored in the output record.
The second problem is a bit more complex. If it is possible, I would recommend that you convert your data into a database, (Why not use Access?) and then use ADO to perform these functions. It probably would be a lot easier.
"It's COOL to say NO to Codeine-coated Land-mine Pops!" -Ruben Bolling
|
|