Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX to maintain a connection to the DB

Status
Not open for further replies.

iwease

IS-IT--Management
Sep 4, 2006
104
CA
Hi,

I've been using a .NET tree view control and AJAX to show heirarchical data from my DB. However, it is slow. Each time I click a node or expand a branch I have to wait for the tree to do its post back. So, what I would like to do is create some sort of activeX control that maintains a connection to the DB for a few seconds before dropping it (so that the user can expand one node, and then the next very quickly with out having to wait for a postback each time)...is this possible?

Is there some other sort of technology I should consider? I want it to run as fast as having a windows app connect to a remote DB
 
Why is the page posting back if you are using AJAX methods? The AJAX call should simply get the new data to append to the page and then add it.

An ActiveX control isn't a method I'd suggest though for several reasons.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
If you are using the 2.0 treeview control, expanding and collapsing the nodes is done client side. And as ca8msm has said, if you are using AJAX, then no postbacks should be happening.
 
what happens with AJAX (what I am noticing anyway) is when I expand a node, the page goes through all the normal event steps (init, load, handle events, pre render, etc). All controls are processed even though only the display for the controls within my update panel are updated. Despite the fact that only the treeview gets updated, Page.IsPostBack is true and so I have been referring to this as a post back (when it really isn't quite).

Also, because my tree is quite large, I am populating the children nodes when the parent gets expanded, so, in this case, expanding is happening via a postback (or whatever the AJAX equivalent name is...callback maybe?)

I understand that ActiveX is not overly popular since it will only run on windows machines (and maybe for other reasons as well). However, I need to be able to populate the children nodes on command and I need a method that has a faster response time than my current method. My program will only be run from windows machines.
 
Maybe there is some way I could preload the tree in the background via a thread or something?
 
My first suggestion would be to cut down on the size of the tree. Too much information is never good. Also, look into the PopulateOnDemand and PopulateNodesFromClient properties.
 
yes, that is how I am populating it.

I am using PopulateOnDemand to populate my tree.

Unfortunately, the nature of the data is large. The way I am cutting down on the size of the tree is by populating it on demand. But I cannot delete data from the DB
 
I am not saying to delete data from the db, only show what is relevant. It is never good to show too much data.
 
ok. I can filter data at certain levels (at least at the root) perhaps by forcing users to choose which area they want to view.

But still, is there another method of tree navigation besides the .NET treeview control + AJAX?
 
If a treeview is what you want, then those are your built in .NET framework controls. There are also 3rd party controls out there, but not sure how much better they would be. Loading large amounts of data will be slow with any control. There are many variables that affect the performance, your DB server, your Web server, your network throughput.. etc.
 
preload's the entire list? If that is the case, then i could probably pre load mine as well
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top