| |
microsoft.public.dotnet.framework |
Hi, I have this code: However, when I run the unit tests (with Nunit) that go into the same code, Why this exception appears and how can I get rid of it? Many thanks,
I'm using Microsoft Sql Management Objects (SMO) - the sql 2005 version of
SQL_DMO) to obtain information about a table's schema.
List<SMOColumn> GetTableSchema( string tableName, bool onlyPKs )
{
Database db = sqlSrv.Databases[ dbName ];
...
"LoaderLock was detected
Message: Attempting managed execution inside OS Loader lock. Do not attempt
to run managed code inside a DllMain or image initialization function since
doing so can cause the application to hang."
and the application hangs.
the damn thing works flawlessly.
Dan