Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The code could be tidied up a little but it looks like it should work. It isn't checking anything that might already be in the table, however, just the set of data you are currently inserting, is that intentional?
Some tips: with: and you don't really need the label/goto, the command 'next' does exactly that, ie jump back to the top of the loop and start the next iteration. As to the IDs, first, you should probably check the current values in the table, to see if the one you want to insert is present, assuming there are any. But a much easier way to do this would be to make the field in the table unique ('no duplicates', in Access), in which case it will simply refuse to insert that line, and you can carry on to the next. C. In reply to Re: How do I avoid inserting duplicate numbers into an Access table?
by castaway
|
|