-
Treeview control works fine on XP but not Win 2K. Why???
Hi all,
I'm testing new versions of our suite of software products on different Windows platforms and found this strange problem the other day.
When running the test release on a clean Windows XP platform, the program adds nodes to a treeview control which represent records stored in an Access database. When a new document is created using the program (and subsequently this creates a record in the database), it adds the node to the treeview control to represent the record in the database. Now this works fine on XP. But when the test release was run on a Windows 2K platform, the program seems to get into a strange infinite loop within an if-else statement which adds the nodes to the treeview. I tried removing the code from the if-else block to see what would happen, but it just seems to jump back and forth within the if block (unfortunately, I'm not in the office so I can't post the code up at the moment which would probably help explain the problem better but I've written some pseudo code to try and illustrate the problem):
if condition met then
'on Windows 2000, the program seems to get into an infinite loop
'here - if this line is removed, it doesn't matter; it still gets into an infinite
'loop which is whats so strange
Treeview1.Nodes.Add(-----)
else if another condition met then
Treeview1.Nodes.Add(-----)
end if
This is probably going to be very difficult to solve from what i've written here so I'll post the actual code up when I'm back in the office but if anyone has any ideas or knows of any bugs with the treeview control when running a release on Windows 2000 as opposed to XP then I would be very grateful as this stupid problem is driving me nuts!!!!
Thank you
-
This really doesn't make a whole lot of sense. Although I've not used the TreeView in all that many projects, I have in a few and have not experienced performance differences between XP and Win2000.
When you were stepping through the code with F8 did you notice any odd behavior with any variables that could be causing a problem?
You said you were testing "new versions"? Does this mean that prior versions of your software had no issues with Win2000?
-
 Originally Posted by Hack
This really doesn't make a whole lot of sense. Although I've not used the TreeView in all that many projects, I have in a few and have not experienced performance differences between XP and Win2000.
When you were stepping through the code with F8 did you notice any odd behavior with any variables that could be causing a problem?
You said you were testing "new versions"? Does this mean that prior versions of your software had no issues with Win2000?
Thanks for the quick response!
Yeh, I don't think I did a terrific job of explaining the problem!!! I'll try posting some code up when I get back in the office and hopefully that might make it a bit clearer
When I stepped through, I didn't actually put a watch on any variables so I'll have a look at that.
The older versions of the software worked fine on Win 2000 (in the new version, we upgraded from using DAO to ADO and the databases were upgraded from Access 97 to Access 2000 if thats any help)
-
-
Thanks for the advice!
I'll check tomorrow when I'm back in the office (I'm going to see if the version number on the MDAC changes in the registry between the older version and the newer version of our software)
I'm thinking I might have a look back through SVN as well to see what was changed between versions in the module that contains the code that is causing the problem
I'll let you know what I find
-
Well, I know there are issues between XP and Vista, but I don't recall seeing posts indicating trouble between XP and Win2000. I'm thinking that it has to be something relatively simple to fix.
However, the problem often is determining what the relatively simple fix should be.
-
Hi Hack,
I've got the extract of code that seems to be where the program is jumping back and forth if you could take a look:
Code:
'clear traps
On Error Resume Next
'Iterate through the records - and then add in for each node
'check each type of group
For intTempLoop = 1 To intGroupCount
'proceed
While rsSet.EOF = False
'create parent
Select Case intTempLoop
Case 1
'THE CODE JUMPS BACK AND FORTH WITHIN THIS CASE AND
'THE STRANGE THING IS IF THIS LINE IS REMOVED, IT STILL DOES IT!!!!
weldspec.TreeView1(listSelection).Nodes.Add strCurrentRoot, tvwChild, strCurrentRoot & rsSet.fields(4), rsSet.fields(1 + (intTempLoop * 2)), strBranchImg, strBranchImg
Case 2
weldspec.TreeView1(listSelection).Nodes.Add strCurrentRoot & rsSet.fields(4), tvwChild, strCurrentRoot & rsSet.fields(4) & rsSet.fields(6), rsSet.fields(1 + (intTempLoop * 2)), strBranchImg, strBranchImg
Case 3
weldspec.TreeView1(listSelection).Nodes.Add strCurrentRoot & rsSet.fields(4) & rsSet.fields(6), tvwChild, strCurrentRoot & rsSet.fields(4) & rsSet.fields(6) & rsSet.fields(8), rsSet.fields(1 + (intTempLoop * 2)), strBranchImg, strBranchImg
End Select
'move to bnext
rsSet.MoveNext
Wend
'move to bnext
If rsSet.RecordCount > 0 Then
rsSet.MoveFirst
End If
Next intTempLoop
Doubt whether you'd be able to work anything out from this but thought it might be worth a go!
Cheers
-
Is this Win2000 workstation or Win2000 server?
-
its Win2000 workstation (Windows 2000 Professional Version 5.00.2195)
-
And it is up to date with all patches and service packs?
-
It was fresh installed from onto a VMWare machine the other day and no patches or updates have been applied. I'm going to trying updating the system now to the latest service packs to see what happens
I'll let you know how I get on!
-
Actually, one of my colleagues has stated that the problem most likely is caused by the fact that the MDAC components are not up to date (as you previously stated) as we upgraded to ADO so I'm going to try and update the MDAC components as well to the latest version to see what happens.
Last edited by adstheman; 02-13-2008 at 05:29 AM.
-
MDAC is definately my first guess, but you should also install those patches and service packs or you could be setting yourself up for other Win2000 related issues.
Lets us know.
-
Also, try eliminating the line
Code:
'clear traps
On Error Resume Next
or substitute for
-
Well, I just upgraded the MDAC components to the latest version and it turned out this IS what the problem was!!! The software works fine now so thanks for all your help guys. I'm glad this is sorted now cos I can now release it!!!! WOO HOO!!!!
Similar Threads
-
By mycwcgr in forum ASP.NET
Replies: 0
Last Post: 10-04-2005, 08:13 AM
-
By norman_fung in forum ASP.NET
Replies: 3
Last Post: 07-13-2005, 12:36 AM
-
By Mark Alexander Bertenshaw in forum VB Classic
Replies: 4
Last Post: 10-10-2001, 10:15 AM
-
By Lijo Joseph in forum VB Classic
Replies: 4
Last Post: 01-08-2001, 03:38 PM
-
By Lijo Joseph in forum VB Classic
Replies: 0
Last Post: 01-06-2001, 07:39 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|