Results 1 to 7 of 7

Thread: saving a recorset

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    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

  2. #2
    Addicted Member
    Join Date
    Jul 2002
    Location
    10000 light years away
    Posts
    143

    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!

  3. #3
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    266

    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().

  4. #4
    Addicted Member
    Join Date
    Jul 2002
    Location
    10000 light years away
    Posts
    143

    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!

  5. #5
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: saving a recorset

    How about putting it into an array?

  6. #6
    Addicted Member
    Join Date
    Jul 2002
    Location
    10000 light years away
    Posts
    143

    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!

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    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
  •  



Click Here to Expand Forum to Full Width