|
-
Jul 10th, 2006, 05:23 AM
#1
Thread Starter
Fanatic Member
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
-
Jul 10th, 2006, 05:27 AM
#2
Addicted Member
Re: saving a recorset
If you are comparing it every three minutes, be sure to compare the date>=now()
I was gratified to be able to answer promptly. I said I don't know!
-
Jul 10th, 2006, 05:28 AM
#3
Hyperactive Member
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().
-
Jul 10th, 2006, 05:29 AM
#4
Addicted Member
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
I was gratified to be able to answer promptly. I said I don't know!
-
Jul 10th, 2006, 05:30 AM
#5
Re: saving a recorset
How about putting it into an array?
-
Jul 10th, 2006, 05:32 AM
#6
Addicted Member
Re: saving a recorset
Good idea! you can release the recordset and keep comparing with the array values
I was gratified to be able to answer promptly. I said I don't know!
-
Jul 10th, 2006, 06:07 AM
#7
Thread Starter
Fanatic Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|