Tracking ADO operation

ADO Wrapper API offers a function that can track every steps of accessing DBMS.

DBMS such as MS SQL Server and etc. comes with query tracker (or query profiler) but sometimes it is prevented for use under security reason by game publishers. Tracking ADO operation can be an alternative solution when query tracker is prohibited. The example below shows how event can be received after a certain delay access time is passed as querying or commanding.

class CAdoWrapEvent:public Proud::IDbmsAccessEvent //This method inherits event interface.
{
void OnQueryDelayed(LPCWSTR lpszcommand,Proud::CPnTime curtime,uint32_t querytick)
{
wprintf(L"QueryDelayed - comment:%s curtime:%s delayedtime:%u",
lpszcommand,curtime.Format("%x %X").GetString(),querytick);
}
};
CAdoWrapEvent g_EventSink;//This method notifies event by the instance.
void main()
{
Proud::CDbmsAccessTracker::DelayedAccessThresholdMilisec = 500; //This method sets the query delay detection time to 500 milliseconds.
//Use ADO wrapper API from here on...
}

This function can also receive events of ADO Wrapper API used in ProudNet Database Cache System version 2.