Unfortunately, I think you've stumbled on to a problem that is difficult to
solve. See the following thread

< http://www.tek-tips.com/gviewthread....787/qid/150767

As I noted in my post to that thread, I can't understand why comsvcs.dll
gets loaded and unloaded multiple times. If you can keep that dll loaded in
memory, the problem goes away. I have been able to solve it by keeping my
ADO connection open for the life of my application, but there may be
alternatives to that. For example, I thought about using LoadLibrary() in
my code to load comsvcs.dll even though my code doesn't use it directly.
That way, it should remain in memory at least until my application called

"Hamed" <arab@raymehr.com> wrote in message news:3d609693@
> I've written a program in VC++ using ADO to connect to a SQLServer 7. /

> through TCP/IP. The program runs on a Win2K Professional client. It works
> fine for some hours but the program should ask a connection every 30

> After about 3 hours or more I get the follow error in my event viewer,
> Application Log section:
> The COM+ Services DLL (comsvcs.dll) was unable to load because allocation

> thread local storage failed.
> Process Name: MyProgram.exe
> Error Code = 0x80070008 : Not enough storage is available to process this
> command.
> COM+ Services Internals Information:
> File: .\comsvcs.cpp, Line: 289
> I'm not expert and I think I've made a general mistake but don't know what
> is it. Please Help
> Thanks in Advance