Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 10th, 2003, 12:09 PM
Registered User
 
Join Date: Jun 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datagrid and ADODC

Hi,

I am using datagrid and adodc controls in visual Basic. Adodc is connected to Access database, and the datasource of the datagrid is adodc. I am wondering when I make changes to the datagrid, is it immediately seen in Access database, and vice versa? The reason I am asking this question is that I did run into some strange behaviour: 1. when I update sth in Access, the corresponding datagrid entry is not immediately changed even after requerying adodc and rebinding datagrid.
2. When I make changes to the datagrid, those changes seems not immediately reflective in Acess.

I would appreciate any suggestion.

Cindy
 
Old November 11th, 2003, 04:28 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

try this code for refreshing

sub refreshgrid()
  On Error GoTo RefreshErr
  Set grdDataGrid.DataSource = Nothing
  adoPrimaryRS.Requery
  Set grdDataGrid.DataSource = adoPrimaryRS

  Exit Sub
RefreshErr:
  MsgBox Err.Description
end sub

Ahmed Ali
Software Developer





Similar Threads
Thread Thread Starter Forum Replies Last Post
use adodc in vb 2005 fiori Visual Basic 2005 Basics 3 July 20th, 2007 08:04 AM
ADODC PROBLEM cnkumar74 VB Components 0 February 16th, 2007 03:27 AM
adodc and flexgrid! smileii VB Databases Basics 6 October 18th, 2006 01:33 PM
Trouble with ADODC ctrl nav1 VB How-To 3 June 21st, 2005 09:19 AM
Adodc records navigation prognoobie VB How-To 1 May 6th, 2004 01:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.