Results 1 to 2 of 2

Thread: eAlreadyInDb error that I can't seem to figure out.

  1. #1
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    706
    Login to Give a bone
    0

    Default 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?

  2. #2
    Member
    Join Date
    2015-10
    Posts
    4
    Login to Give a bone
    0

    Default Re: eAlreadyInDb error that I can't seem to figure out.

    It is really hard to determine what is going on without any code samples. That being said, the error is telling you that you are trying to add something to the database that is already present in the database. It has nothing to do with not closing something. I would make sure that you are not adding the same text item more than once and that you create a new one each time you process a polyline. You might try encapsulating the code that creates and adds the text object into its own method/class and call that for each polyline found.

Similar Threads

  1. Replies: 1
    Last Post: 2017-02-20, 06:16 PM
  2. Replies: 12
    Last Post: 2014-10-10, 01:01 PM
  3. I know this can be done but can't figure out how
    By camilla.mott in forum AutoCAD General
    Replies: 6
    Last Post: 2008-09-25, 05:24 AM
  4. Set Figure Label Styles in the Figure Prefix Database
    By civil3d.wishlist1941 in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2008-01-09, 09:38 PM
  5. error message and I can't figure it out.
    By eleonard in forum AutoLISP
    Replies: 5
    Last Post: 2005-08-29, 11:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •