Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8587689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:37:46+00:00 2026-06-11T22:37:46+00:00

I tried following the examples, using a Using statement to open an instance, create

  • 0

I tried following the examples, using a Using statement to open an instance, create a session, attach to the database, open it, then perform some operations like opening a transaction and saving a record. But when I use this pattern for each operation. Each operation like a Save take around .5 second. So I think I am doing this wrong. but I am not sure how I should be doing this.

should I only have one Instance? can I have more if they are named differently?

can I / should I have more if I have more than one thread?

I see I can have multiple sessions open at the same time, I think that is OK but does every session need to be attached? should the database be opened for each session? I am getting inconsistent results when I test these various scenarios, Sometimes my tests pass sometimes I get exceptions , like trying to use a disposed object, or EsentTempPathInUseException.

So is there any guidance on how I should use this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:37:47+00:00Added an answer on June 11, 2026 at 10:37 pm

    I have found these answers elswhere or by trial and error but for anyone that sees them here…

    You should have only one instance, creating the instance is very expensive it really is creating the database and because it self heals itself from a unexpected shut down it could be running those routines if needed.
    you cant open more than one instance if you name it something different it will create a second instance that is different from the first. If you overlap them then you will get an error.

    No problem with multi-threading. Open a database once. Attach a session once. Sessions should not go across threads. You can have multiple threads with their own sessions each accessing the database.Make sure you dispose of managed escent objects. SO follow the examples to use “Using” statements or make sure that objects dispose of them.

    EsentTempPathInUseException is thrown trying to open a second instance while a current instance is still in use.

    The disposed object exceptions I was having was because I was overlapping the creating and disposition of Managed Esent objects when I should not be.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the following example (apologies for the length) I have tried to isolate some
Using a Perl replace statement (s//) I'd like to modify some XML by adding
I tried to use the following example codes by using a ? b :
I tried following the following example to make an HTTP link in my TextView
I tried the following example for applying a linear gradient: GradientPaintDemo2D . It works
I tried following the gradle manual with their example like this but copyJars is
In the following example, I tried to use uninterpreted Boolean function like (declare-const p
I tried to use dat.GUI in the following three.js example . I just did
Following the README instructions of the jboss-as-kitchensink example , I have tried to run
Bare with the following, as I tried to think of a simple example and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.