Print Page | Close Window

Updating values in Columns

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=5372
Printed Date: 07 June 2024 at 1:13am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Updating values in Columns
Posted By: rdeboer
Subject: Updating values in Columns
Date 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?
 
 
 



Replies:
Posted By: sserge
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net