Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Updating values in Columns
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Updating values in Columns

 Post Reply Post Reply
Author
Message
rdeboer View Drop Down
Groupie
Groupie


Joined: 29 April 2004
Location: Netherlands
Status: Offline
Points: 81
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdeboer Quote  Post ReplyReply Direct Link To This Post Topic: Updating values in Columns
    Posted: 27 October 2006 at 11:43am
Hi,
 
In my code i update a value in a column like this:
 
FoundIndex = FindRowIndex(Connection(Index).Fingerprint)
 
If FoundIndex > -1 Then
            NumberCompleted = frmDownloadQueue.DownloadQueue.Records(FoundIndex).Item(9).Value
            frmDownloadQueue.DownloadQueue.Records(FoundIndex).Item(9).Value = NumberCompleted + 1
            frmDownloadQueue.DownloadQueue.Populate
            
End If
 
 
 
The value is updated randomly in 4 seperate tasks for about 200 times.
 
The first xxx times it updates without problems, after that it gives a 'Runtime error 5' Invalid procedure when i want to update the value:
 
NumberCompleted = frmDownloadQueue.DownloadQueue.Records(FoundIndex).Item(9).Value
 
I'm sure the value is OK, and the row exists.
 
What could be wrong here?
 
 
 
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 29 October 2006 at 4:36am
Hi,

The problem looks to be that you're searching for row index (your method FindRowIndex), and then trying to access a Record by its index (DownloadQueue.Records(FoundIndex)). It's not the same, and this could be a problem. 

You may have to perform additional transformation:

FoundRowIndex = FindRowIndex(Connection(Index).Fingerprint)
FoundIndex = frmDownloadQueue.DownloadQueue.Rows(FoundRowIndex).Record.Index


--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.171 seconds.