I have a question with repeat open and close table
I write one thread with use Vc6 IDE and I need repeat read data from table
but it had throw error message when my application is runing.
Error message is:
This application has requested the Runtime to terminate it in an unusual
please contact the application's support team for mor information
My segment of code fellow:
return false if empty data
ASSERT(m_pConn != NULL); //ado connection
ASSERT(m_pTable_SMO != NULL); // table
if (m_pTable_SMO->GetState() & adStateOpen)
m_pTable_SMO->Close(); //close my table
m_pTable_SMO->Open("select * from t_sminorder", //open my table
bool Empty = (bool)m_pTable_SMO->ADOEOF;
I need repeat read data from table in my thread code,
it process repeat data in my thread
DWORD WINAPI CReadData::Read_MO(void* lpParam)
if( pRd->OpenTable() == false) //read data from table
It wouldn't any exception when I add one sentence with Sleep(1000) ,
Why don't rapid read data?
I write other code in CBuilder,write simple code with repeat open and close
fastcall void TForm1::Button1Click(TSender : Sender)
it is good for rapid read data from table, it explain the ADO support to
rapid open and close operate,
but why don't rapid close and open in VC6?
Please master-hand give me directions....