If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Access Query won't Update at Run-Time

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-10-03, 10:29
SlashZero SlashZero is offline
Registered User
 
Join Date: Jul 2003
Posts: 1
Access Query won't Update at Run-Time

I am writing a program in Visual Basic 6.0 that uses an Access Database for it's Data Storage to enable Users to generate Orders and then send them via Internet to the distribution company.

I have a Data Access Grid that shows the list of items in the Order and a collection of controls below it to Interact with the data. Clicking an item in the data grid, sets the pointer to the corresponding record in the database. The Data Bound controls then update to the corresponding record correctly.

The problem occurs when I make a change to a line detail. There is a query based off the table that gets changed and a static table in the database. The Control Bound to the field of the Query will not update.

(Ex. One table is Order Details ([OrderDt]) and has a field called [Qty]. Another table is the complete Item List ([ItemList]) and has a field called [MinPack] for the # of pieces that come per pack. Then the Query [Display] multiplies those 2 fields for Extended Quantity [ExQty]. In the program, there is a Bound Control to [ExQty] of [Display]. And if I change the [Qty] of the [OrderDt] table the [ExQty] of the [Display] Query will update, but not the Bound Control's diaply)

Last edited by SlashZero; 07-15-03 at 14:18.
Reply With Quote
  #2 (permalink)  
Old 07-18-03, 04:47
citizen.ron citizen.ron is offline
Registered User
 
Join Date: Jul 2003
Location: Frankfurt, Germany
Posts: 20
Re: Access Query won't Update at Run-Time

whow, that is a real long description text, hm?

if i understand your problem correctly, all you need to do is a refresh on your data grid after executing the update query, something like:

myGrid.Requery
or in some extra tricky cases you might to reattach the data source to the whole grid (especially if it is a stored proc):

myGrid.DataMember = (stored proc name) or (tableName)

hope this helps
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On