PDA

View Full Version : Error when running sub - eNotOpenForWrite


bweir
2006-10-19, 05:56 PM
If you look at the attached PDF you will see a sub from a button. When clicked the button will iterate through items in a ListView control and place text in the drawing. This is were the problem starts. The sub executes fine until it hits lines 410. The an error is thrown and I get an error message (see attached Err.png).

I can't see what I'm doing wrong. The code is basically copied and pasted from other source and it worked fine there. Can somebody help?

bweir
2006-10-23, 04:54 PM
I figured it out. I needed to move my oTrans.Commit() statement outside of the loop and it works fine.