EsentInvalidBufferSizeException

Nov 15, 2010 at 12:27 AM

While testing my application on a spare Vista machine I encountered this error opening a database in both readonly and update modes. The error does not occur on my Win7 dev machine. My application created the database with default values and no tables or indexes. The same application fails to open the database using the same default values. I have never seen this error before today.

I went looking for some parameters that might affect this error, but I can't see anything obvious. Any advice would be most welcome as I've run out of ideas.

Greg

Nov 15, 2010 at 4:30 AM
Which API is returning that error?
On Sun, 14 Nov 2010 17:28 -0800, "gfkeogh" <notifications@codeplex.com> wrote:

From: gfkeogh

While testing my application on a spare Vista machine I encountered this error opening a database in both readonly and update modes. The error does not occur on my Win7 dev machine. My application created the database with default values and no tables or indexes. The same application fails to open the database using the same default values. I have never seen this error before today.

I went looking for some parameters that might affect this error, but I can't see anything obvious. Any advice would be most welcome as I've run out of ideas.

Greg

Read the full discussion online.

To add a post to this discussion, reply to this email (ManagedEsent@discussions.codeplex.com)

To start a new discussion for this project, email ManagedEsent@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Nov 16, 2010 at 10:36 AM

My apologies, I thought it was the open API call and just assumed that, but it's not ... I had another closer look and it's really the JetGetDatabaseFileInfo call.

Based upon previous discussions, I make this call before creating the instance and opening so that I can get the page size and try to avoid a page size mismatch

-- Greg

Nov 23, 2010 at 7:12 PM

The problem is fixed in changelist 57994. It was a compatability problem with pre-Win7 versions of the API, which only take smaller versions of JET_DBINFOMISC.

 

        /// <summary>
        /// Create a database and call JetGetDatabaseInfo.
        /// </summary>
        public void TestGetDatabaseInfo()
        {
            try
            {
                this.CreateDatabase();
                this.TestJetGetDatabaseInfo();
                this.CheckDatabase();
            }
            finally
            {
                Cleanup.DeleteDirectoryWithRetry(this.databaseDirectory);
            }
        }

Nov 26, 2010 at 5:38 AM

Yes, thanks! 57994 has fixed the problem on Vista. I notice the FileInfo API is fancier now.