Results 1 to 6 of 6

Thread: Data grid & ADO

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 1999
    Posts
    165
    I have set a datagrid to link to db via ADO. Problem is that in code part of its underlying record is updated directly - but this does not get reflected in the datagrid.
    Is there a command which will update the datagrid with current data in the underlying tables.

  2. #2
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232
    DBgrid1.Refresh will do the trick...

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 1999
    Posts
    165

    Isolated cause of problem ... more help please!

    The grid is based on a DED command with child command.
    The child command is query joining two tables. The first holding each child/detail row for the master record ON THE FORM. The second table holds the look ups. So on the detail record there is a foreign key for the type of item we are dealing with. The lookup holds the full description.
    When the code sets a new foreign key this query obviously doesnt refresh - despite my best efforts!!
    Please, please, please help!!!
    Thanks

  4. #4
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232
    Sorry, I didn't realize you were using ADO, yes this is a known symptom. You need to rebind your control by resetting the datasource property to the command. Discussion on this subject you can see here in this page:

    http://support.microsoft.com/support.../Q191/4/57.ASP

    [Edited by pardede on 04-10-2000 at 09:21 AM]

  5. #5
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232
    Glad it helped, at least as far as it went

    For your new question: I have so far only came across the error you mentioned once in the hectic of coding, but never able to reproduce it. If you would post some code or take a look (by step-debugging) exactly where the error occurs maybe I can help look for the cause.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jan 1999
    Posts
    165

    Wink Sorted!!

    Thought you might like to know...
    Found the bug!!
    As part of my emulation of drop-downs (and other things) in the DataGrid I use a variable to hold a copy from the DED of the recordset and on inspection I found that this defaults to static cursor etc.


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