in reply to Process Text File and Write to Database

Others have pointed out your misunderstanding of next. Here are some other pointers.

I hope these point are helpful.

Cheers,

JohnGG

Update: Corrected cut'n'paste error where I'd copied an earlier piece of test code with a shorter subroutine name in the call, pvar rather than printVariables