I had a similar problem and Si pointed me at a post of JMcIlhinney's. That might be your problem


edit> also, as an aside, you don't need to open and close your connection each time you run the insert. It would be more efficient to open it before the loop and close it afterwards.