azwaan
05-28-2003, 07:24 AM
i have a application which reads data from the com port through the use of MSCOMM control and send it to a text file.
i periodically (with a Timer Control) check the text file, process the raw data and send it to a database.
the problem , is occasionaly there is an error "File already Open" , i am fairly certain , this is because, i am trying to dump data into the text file, when i already have it open to process the data.
is there a way to synchronoise both these events ..ie "MSCOMM_ONCOMM event " and the TIMER_Timer Event so, that this does not happen.
i periodically (with a Timer Control) check the text file, process the raw data and send it to a database.
the problem , is occasionaly there is an error "File already Open" , i am fairly certain , this is because, i am trying to dump data into the text file, when i already have it open to process the data.
is there a way to synchronoise both these events ..ie "MSCOMM_ONCOMM event " and the TIMER_Timer Event so, that this does not happen.