Hai,
I have developed an SDI application in VC++ 6.0 version to connect remote MSSQL server through "OLE-DB" in Windows 2000 Proffesional . Through the IDE,i have selected "OLE-DB provider for ODBC Driver ".
I have used two threads, one for computation and another for accessing database. In the database thread, for every 2 second the rowset is opened, updated and closed. In the Second thread, for every 10 millisecond data is computed.
My Code looks like,
xxView.cpp
Database Thread()
{
for(;;)
{
Waitforsingleobject(x,2000) // Two second event
{
m_pSet->Open();
// Update data
m_pSet->SetData();
m_pSet->Close();
}
}
return 0;
}
xxapp.cpp
Comput Thread()
{
for(;;)
{
Waitforsingleobject(x,8) // event
{
//Compute data
}
}
return 0;
}
The application is in debug mode, well application work in development PC. When i deploy the application in a Client PC for testing with debug mode, the application works well for first few hours, then the application lags. The computation thread is delayed in seconds.
In the client PC i have installed MDAC 2.8.
* What could be the reason? Is it due to the sharing resources of "Msvcrt.dll".
* Also another application uses the same database.
* Do i have to statically link the MFC Dll?
Thanks in Advance.
There can be varieties of reasons such as memory leak, network condition changes, antivirus softwares and many others. You can profile your code (by adding trace/log point around APIs and to narrow down the issue.
Thanks,
No comments:
Post a Comment