2 Replies Latest reply: Aug 20, 2012 8:57 PM by vinothchandar RSS

    Dumb Database open() close() question

    vinothchandar
      I think I understand this right. But want to confirm if its true

      If I do a

      Database db = env. openDatabase(....)

      // do some db operations
      ..
      ..

      and then
      db.close()

      this does not impact in any way other database handles that are open for the same db right?
        • 1. Re: Dumb Database open() close() question
          Greybird-Oracle
          When you open multiple handles for the same DB, the DB is not closed internally until the last handle is closed. It's simple reference counting.

          --mark                                                                                                                                                                                                                                                                                                                       
          • 2. Re: Dumb Database open() close() question
            vinothchandar
            Cool. Thanks.. I am just opening a Db handle so I can do a db.count(). So, closing after I am done should be fine then.