Results 1 to 3 of 3

Thread: True DBGrid and refreshing it

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    39

    Question

    At the minute I have a True DBGrid that on the form load event is populated using a SQL stored procedure (an spg) and an event "GetAllRecords". What I have to do is to add a timer control and refresh the grid every 10 seconds while it's active.

    Now I know I have to set the timer interval to 10,000, but how do I get the grid to re-populate all the time? Where do I place the code to allow this to happen?

    Any ideas? All help appreciated!

    Thanx in advance
    Gin

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898

    Cool

    Hi,

    Put the code that calles the stored procedure into its own routine. Call it on the form load and in the timer event. Use the grids rebind method just after you have run the stored procedure.

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    39

    Talking

    Sorry I've just re_read my post!, I have a routine called GetALlRecords that calls the stored procedure to populate the grid from the Form_Load event.

    I'll have a go at placing it in the timer event and rebinding the grid!

    Thanx for the help Bill.

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