Updating a DBGrid 
Author Message
 Updating a DBGrid

I am having trouble getting a DBGrid to update.  I have the DBGrid on Form1,
and link to Form2 to make additions, deletions, and other modifications.
When the focus is returned to Form1, I would like it to automatically
refresh.  However, for right now, I'd settle for placing a button on Form1
to Refresh.  I've put the following code on this refresh button:

adodc.refresh
dbgrid.refresh

However, no data changes ... even though I just made changes in Form2.

If I back out of Form1 and go back in again, the data is now refreshed.

Thank you in advance for your help!

--
Dale



Sat, 09 Aug 2003 07:02:19 GMT  
 Updating a DBGrid
dbgrid.refresh refreshes graphic just like Picture1.Refresh.
Try using dbgrid.refill to Re-fill records in grid.


Sun, 10 Aug 2003 09:22:50 GMT  
 Updating a DBGrid

Thanks for responding Ivan.  However, there is no refill command available
for my Datagrid (or Flexgrid if  I use that).

Dale
--
Dale

Quote:
> dbgrid.refresh refreshes graphic just like Picture1.Refresh.
> Try using dbgrid.refill to Re-fill records in grid.



Sat, 23 Aug 2003 04:03:07 GMT  
 Updating a DBGrid
I'm not sure if it is the correct way, but it works;

adodc.recordset.close
adodc.recordset.open "SELECT * FROM dbMine"
Set dbgrid.datasource = adodc.recordset

Dave


Quote:
> I am having trouble getting a DBGrid to update.  I have the DBGrid on
Form1,
> and link to Form2 to make additions, deletions, and other modifications.
> When the focus is returned to Form1, I would like it to automatically
> refresh.  However, for right now, I'd settle for placing a button on Form1
> to Refresh.  I've put the following code on this refresh button:

> adodc.refresh
> dbgrid.refresh

> However, no data changes ... even though I just made changes in Form2.

> If I back out of Form1 and go back in again, the data is now refreshed.

> Thank you in advance for your help!

> --
> Dale



Mon, 25 Aug 2003 10:05:23 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Forcing file update with DBGrid in VB4?

2. Update on DBGrid

3. Updating a DBGrid

4. What happens AFTER updating a DBGrid?

5. updates and Dbgrid Question

6. update and DBgrid Question

7. How do I force file update with DBGrid control?

8. (DBGrid) Updating Appearance with out updating Database

9. (DBGrid) Updating appearance without updating Database

10. DBGrid - Drag and drop data from one DBGrid to another DBGrid

11. Help - DBGrid update

12. How to update DbGrid

 

 
Powered by phpBB® Forum Software