views:

277

answers:

0

Hi,

I am having troubles with one of our applications. It's .NET 3.5 32 bits process. Upon startup we open a .mdb to read a few "metadata" values. This works on hundreds of systems, but we have a customer with a TabletPC and problems. The operating system is Windows XP Tablet PC SP3, 32 bits, bla bla. Nothing unusual. It has .NET 3.5 (from Windows Update) All up to date. Nothing out of the ordinary.

Since our application does a "few things" during startup, I've created the simplest console application ever:

namespace TestAccessConnection
{
    class Program
    {
        static void Main( string[] args )
        {
            OleDbConnection connection;
           try
            {
                connection =
                    new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=metadata.mdb;Persist Security Info=False");
                connection.Open();
                connection.Close();
                Console.Read();
            }
            catch ( Exception e )
            {
                Console.WriteLine(e.ToString());
                Console.Read();
            }
        }
    }
}

Results:

If we execute that single .exe without the file "metadata.mdb" in the same path, we get the obvious: "file not found bla bla bla". That is correct.

If we copy the metadata (more on metadata later), we get this:

System.OutOfMemoryException: An exception of type 'System.OutOfMemoryException' has occurred.
  at System.Data.Common.ADP.IsSysTxEqualSysEsTransaction()
  at System.Data.Common.ADP.NeedManualEnlistment()
  at System.Data.OleDb.OleDbConnection.Open()
  at TestAccessConnection.Program.Main(String[] args

note: the exception was in spanish and I translated it, but the content remains the same, the only differences were the "an exception of type", but the Namespaces are untouched

What's in the metadata?: It's a simple MS ACCESS 2000 file with one table and a couple of records (it stores different MS-SQL connection strings in an encrypted form), so upon startup we can read the connections, decrypt them and present a list for the user to choose different connections. None of that functionality is present (or executed) in the test program I've created, since the exception is thrown (apparently) in the connection.Open()

More about this computer in particular The box seems normal. We've reinstalled .NET from different sources (Windows Update) and the dotnetfx.exe (the big 250mb file) and even executed a "repair" from that big .net installer. .NET seems to work, since this little console application targets .NET 3.5.

Why this test? The reason why the console application does only that it's because our own application does (Among a few other things) that as soon as it starts executing Main(), it's one of the first things we do, so I isolated that piece of code and found out that the exception is being thrown there. In order to make sure that none of our code had anything to do, I created the test application and found the weird exception.

What about Google? I have been frantically searching google/SO/etc. to no avail. OutOfMemory is a very misleading search term, even when coupled with oledb and other "possible" keywords ('tho I might be missing something). Trying to search using other parts of the namespaces, points to weird results that do not appear to be related to this particular issue.

What is the question? Oh, that's simple: Any Ideas?

Catch I am trying to avoid reinstalling the whole Windows (which might as well fix the problem, given that this simple thing works on hundreds of other computers). The box doesn't appear to be infected with malware or similar, it's a Tablet PC used in Healthcare, so the Internet access although "open" is rarely used if used at all. This doesn't mean the box is 100% clean (you can never be sure with Windows). If you know or have experienced this issue (and found a fix), please enlighten me.

Thanks in advance!