eAlreadyInDb error that I can't seem to figure out.
What causes the eAlreadyInDb error? I have a transaction that iterates through a selection set and when it finds a polyline it creates another transaction that adds a text object at the polyline. Each transaction is "commited" and both are wrapped inside a Using---End Using. If I only select one polyline it works great but as soon as two or more are in the selection set it throws the eAlreadyInDb error. Am I not closing something? I thought by adding Using---End Using to each transaction it would close it and move on to the next polyline in the selection set and then open the blocktablerecord again for write. What am I doing wrong?
Re: eAlreadyInDb error that I can't seem to figure out.
I just posted this question 10 minutes ago and then figured out what was going on so I decided to reply with my own solution....
Turns out, I was setting up the text object way up at the top of my code (Dim Areaatextobj As DBText = New DBText) and then I was trying to build this text object and add it to the database over and over again with each polyline that it found in the selection set. All I had to do is move this piece of code into the inside of the selection set iteration so it would set up a new text object with every polyline that it finds. Something so simple has been driving me crazy for weeks. Oh well... it works now.