المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : SQL connectivity issue in My own Windows Serive



C# Programming
01-28-2010, 01:50 PM
Hi,

I've a service that push data from MSSQL db based on time frequency. Everything is fine, except while starting the system. At this time alone an error is coming "Operation not allowed when the object is closed."

I traced this error, this is because my service is start the prcoess before the SQL server is stared. I can handle this either delaying my service process to 2 or 5 mins or I can handle this exception in my catch block.

But I want to know any other way to handle this, like can I force my service once the SQL server is started or Is it possible to check a windows service (SQL Server) was started or not.

If any idea pls share with us.

Thanks & Regards,
Rishi

WinCrs