-
saving a recorset
Hi
I have a VB6 program that connect to a table"Schedule",this table has 2 fields:Meeting Description and Date,when the program loads,it should read each record and compare its date field with now(),if it's equal,a MsgBox appears telling the user about the meeting,this process must be done every 3 minutes.
My problem is that I don't want to open a recordset every 3 minutes to compare the date with now,so i was thinking of storing the recordset obtained from the form load and instead of looping through the recorset to view the meeting that has a date=now() to loop through the stored recorset.
can anyone have an idea about how to do it?
thanks
-
Re: saving a recorset
If you are comparing it every three minutes, be sure to compare the date>=now()
-
Re: saving a recorset
open recordset on form load .... and dont close it also take recordset as public variable so that it could b access in other events also
then in timer event put a loop to compare thae records with now().
-
Re: saving a recorset
In fact u need not open a recordset every 3 minutes. that would be a waste of resources. try using a persistent recordset
-
Re: saving a recorset
How about putting it into an array?
-
Re: saving a recorset
Good idea! you can release the recordset and keep comparing with the array values
-
Re: saving a recorset
Hi to all
I was thinking saving the recordset into an array,but i don't know too much about the use of array
can anyone guide me about the use of array in this case?
thanks in advance