Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Faster Performance

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Data Objects Support
View previous topic :: View next topic  
Author Message
esanabia



Joined: 29 Sep 2008
Posts: 23

PostPosted: Wed Aug 19, 2009 1:44 am    Post subject: Faster Performance Reply with quote

Is there a way to re-populate my Virtual Tree using your Virtual Data Objects?

I have a list of records. When the user clicks on one of the items in the list, I re-populate my virtual tree with some detailed information. I run the following 3 lines of code to repopulate the tree...

_vtAccessories.SuspendLayout()
_vtAccessories.DataSource = New AccessoryRecordset(lngCabinetRunID)
_vtAccessories.ResumeLayout()


The returned recordset is very small (1 or 2 records). Nevertheless, it takes about 3 seconds to repopulate the tree. Is there another method I should be using?

Thanks for your help.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Aug 19, 2009 10:45 pm    Post subject: Reply with quote

Three seconds is definitely way too long. If you run the Database Browser sample (in Virtual Tree samples) and put a break point on the line

Code:
 _virtualTree.DataSource = New VehicleRecordset


You will see that the time for the tree to be populated (after clicking run from this point) is almost instantaneous - even for a very large recordset.

I suspect it is probably an issue with either the database or the query you are using. What database backend are you using?

If you look in the trace (output) window while debugging you will see that Virtual Data dumps out the actual ADODB queries performed eg

Code:
VirtualData Query: SELECT * FROM Vehicle ORDER BY Model ASC


You could try executing the query directly using ADODB to see if the problem lies in the database connection or query.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
esanabia



Joined: 29 Sep 2008
Posts: 23

PostPosted: Thu Aug 20, 2009 12:57 am    Post subject: Reply with quote

It turns out the problems was with another query - nothing to do with the setting the data source property. Problem solved.

Thanks for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Data Objects Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group