Thanks,PJ Arends! But in my program i didn't use message handlers :doh: (i planned to use once, but now i didn't use it. Maybe cos i remained the definition?? ) #define WM_OPENRECORD WM_USER + 100 // #define WM_STARTCALL WM_USER + 101 // and i found i made a stupid mistake: while(1) { pRs = new CADORecordset(pAdoDb); while(DB_CONNECTED) { Dosomething(); if(DB_problem)break; } } it seemed i forgot to "delete pRs"! while(1) { pRs = new CADORecordset(pAdoDb); while(DB_CONNECTED) { Dosomething(); if(DB_problem)break; } // 20050131 Modified by Dick delete pRs; } maybe this cause the problem? i'm not sure, now i'm letting the program run and watch whether i get next error. (if i do get, i'll go to ask you again,hope you don't feel it's a trouble ;P ) Thank you sooooooooo much! :) Have a good day!! ________________________________________ Many nights we've prayed with no proof anyone could hear, we were moving moutains long before we knew we could! Yet now i'm standing here, although we know there's much to fear, hope seemed like summer bird too swiftly flown away ... There can be miracles! When you believe, though hope is frail, it's hard to kill! Who knows what miracles, you can achieve! When you believe, somehow you will ... YOU WILL WHEN YOU BELIEVE