473,757 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Loading controls with objects versus recordsets

I'm building a vb.net Forms project that is getting data from a SQL Server
database.

One of the main goals of the project is to be really responsive to events,
such as textbox change events. I have a textbox for searching, a listbox to
display the searched results, and a big textbox (memo) to display the
clicked-results of the listbox item.

My question is: should I load the controls with objects, and therefore store
everything in memory for fast performance, or is SQL Server fast enough to
capture textbox_change events and return recordsets? Or am I asking too much
of SQL Server? Locally, there will be a dedicated MSDE database, so the load
is manageable. The main database is a shared SQL Server db which is
synchronized as needed.

I have had great results loading controls with objects...the performance is
incredible. However, I think that in the future, as the dataset grows, I
might be storing a couple of megs in RAM, so there might be a penalty in the
future. If I use recordsets, I immediately get a performance penalty, but I
have unlimited future growth.

I appreciate any feedback from anyone on this...what your preferences are
and why. thanks

Apr 29 '06 #1
4 1513
mrmagoo wrote:
I'm building a vb.net Forms project that is getting data from a SQL Server
database.

One of the main goals of the project is to be really responsive to events,
such as textbox change events. I have a textbox for searching, a listbox to
display the searched results, and a big textbox (memo) to display the
clicked-results of the listbox item.

My question is: should I load the controls with objects, and therefore store
everything in memory for fast performance, or is SQL Server fast enough to
capture textbox_change events and return recordsets? Or am I asking too much
of SQL Server? Locally, there will be a dedicated MSDE database, so the load
is manageable. The main database is a shared SQL Server db which is
synchronized as needed.

I have had great results loading controls with objects...the performance is
incredible. However, I think that in the future, as the dataset grows, I
might be storing a couple of megs in RAM, so there might be a penalty in the
future. If I use recordsets, I immediately get a performance penalty, but I
have unlimited future growth.

I appreciate any feedback from anyone on this...what your preferences are
and why. thanks


You are not thinking about it correctly. if you are loading controls
from objects or directly from SQL the data still has to come from SQL at
some point. Now if you are talking about bringing all the data down and
storing it locally, that will always be fastest.

Chris
Apr 29 '06 #2
It's correct.

Depending on the design, there are 2 general possibilities. (or more if you
can think of a better way).

If this is an object based approach, launching the application returns a
recordset and loads all of that into memory. From that point on, the events
load controls from memory.

If this is all recordsets, launching the application does nothing. Typing in
the controls returns small recordsets of matched results for each keystroke.

Does that make sense? At some intervals there will always be recordsets. For
the memory based approach, it occurs on app launch and other intervals as
needed. Perhaps there will be a "refresh" command button that will re-load
all of the objects from the same event that loaded the recordset on app
launch.

For the recordset approach recordsets occur a lot more frequently.
"Chris" <no@spam.com> wrote in message
news:un******** ******@TK2MSFTN GP02.phx.gbl...
mrmagoo wrote:
I'm building a vb.net Forms project that is getting data from a SQL Server database.

One of the main goals of the project is to be really responsive to events, such as textbox change events. I have a textbox for searching, a listbox to display the searched results, and a big textbox (memo) to display the
clicked-results of the listbox item.

My question is: should I load the controls with objects, and therefore store everything in memory for fast performance, or is SQL Server fast enough to capture textbox_change events and return recordsets? Or am I asking too much of SQL Server? Locally, there will be a dedicated MSDE database, so the load is manageable. The main database is a shared SQL Server db which is
synchronized as needed.

I have had great results loading controls with objects...the performance is incredible. However, I think that in the future, as the dataset grows, I
might be storing a couple of megs in RAM, so there might be a penalty in the future. If I use recordsets, I immediately get a performance penalty, but I have unlimited future growth.

I appreciate any feedback from anyone on this...what your preferences are and why. thanks


You are not thinking about it correctly. if you are loading controls
from objects or directly from SQL the data still has to come from SQL at
some point. Now if you are talking about bringing all the data down and
storing it locally, that will always be fastest.

Chris

Apr 29 '06 #3
mrmagoo wrote:
It's correct.

Depending on the design, there are 2 general possibilities. (or more if you
can think of a better way).

If this is an object based approach, launching the application returns a
recordset and loads all of that into memory. From that point on, the events
load controls from memory.

If this is all recordsets, launching the application does nothing. Typing in
the controls returns small recordsets of matched results for each keystroke.

Does that make sense? At some intervals there will always be recordsets. For
the memory based approach, it occurs on app launch and other intervals as
needed. Perhaps there will be a "refresh" command button that will re-load
all of the objects from the same event that loaded the recordset on app
launch.

For the recordset approach recordsets occur a lot more frequently.
"Chris" <no@spam.com> wrote in message
news:un******** ******@TK2MSFTN GP02.phx.gbl...
mrmagoo wrote:
I'm building a vb.net Forms project that is getting data from a SQL
Server
database.

One of the main goals of the project is to be really responsive to
events,
such as textbox change events. I have a textbox for searching, a listbox
to
display the searched results, and a big textbox (memo) to display the
clicked-results of the listbox item.

My question is: should I load the controls with objects, and therefore
store
everything in memory for fast performance, or is SQL Server fast enough
to
capture textbox_change events and return recordsets? Or am I asking too
much
of SQL Server? Locally, there will be a dedicated MSDE database, so the
load
is manageable. The main database is a shared SQL Server db which is
synchroniz ed as needed.

I have had great results loading controls with objects...the performance
is
incredible . However, I think that in the future, as the dataset grows, I
might be storing a couple of megs in RAM, so there might be a penalty in
the
future. If I use recordsets, I immediately get a performance penalty,
but I
have unlimited future growth.

I appreciate any feedback from anyone on this...what your preferences
are
and why. thanks


You are not thinking about it correctly. if you are loading controls
from objects or directly from SQL the data still has to come from SQL at
some point. Now if you are talking about bringing all the data down and
storing it locally, that will always be fastest.

Chris



It all depends on the size of your dataset and what the client computer
specs would be. No general way is correct.

Chris
Apr 29 '06 #4
Mr Magoo,

It depends all from the style from your query box and the ammount of data.

Probably a recordset will not help you much to get speed, because the
datatable is much faster to retrieve and to access. Your program will as
well be needless large because the extra memory you will have to use to hold
the ADODB DLL.

I would just start with creating a query for SQL and return the answer with
an executeScalar.

Just my thought,

Cor

"mrmagoo" <-> schreef in bericht
news:uL******** ******@TK2MSFTN GP05.phx.gbl...
I'm building a vb.net Forms project that is getting data from a SQL Server
database.

One of the main goals of the project is to be really responsive to events,
such as textbox change events. I have a textbox for searching, a listbox
to
display the searched results, and a big textbox (memo) to display the
clicked-results of the listbox item.

My question is: should I load the controls with objects, and therefore
store
everything in memory for fast performance, or is SQL Server fast enough to
capture textbox_change events and return recordsets? Or am I asking too
much
of SQL Server? Locally, there will be a dedicated MSDE database, so the
load
is manageable. The main database is a shared SQL Server db which is
synchronized as needed.

I have had great results loading controls with objects...the performance
is
incredible. However, I think that in the future, as the dataset grows, I
might be storing a couple of megs in RAM, so there might be a penalty in
the
future. If I use recordsets, I immediately get a performance penalty, but
I
have unlimited future growth.

I appreciate any feedback from anyone on this...what your preferences are
and why. thanks

Apr 29 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1300
by: Darter Dan | last post by:
I've read that stored procedures should use output parameters instead of recordsets where possible for best efficiency. Unfortunately I need to quantify this with some hard data and I'm not sure which counters to use. Should I be looking at the SQL Server memory counters or something else. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
5
12237
by: John Richardson | last post by:
I've been bothered for some time about my DataGrid not populating my rows very quickly. I have about 10K rows loading into the grid. I create a datatable dt with 2 columns, an ID and a display. The ID is a member of the keys array. I then create a DataView dv over the table, and sort it by Display and ID column (in case of duplicate Display). I then set my DataGrid.DataSource = dv; I then load the datatable with my rows, and this is...
13
1795
by: Simon Harvey | last post by:
Hi All, I have a colleague that I wprk with that develops using ASP. I develop using ASP.net. He seems to make sites much faster than me and I am wondering if its because of the two different technologies. I use codebehinds as standard Does anyone else find that developing with ASP.net takes more work than asp.
7
1571
by: Tim | last post by:
I am trying to load both server and user controls into placeholder controls on a aspx template page at runtime. These values would be strings that are returned from a database query. I know I can do this for user controls easily using: oContent = (ControlBase) Page.LoadControl(Session + ".ascx"); this.plcContent.Controls.Add(oContent); but can not figure out how to do it for server controls. since I do not know what the control...
1
1423
by: kanones | last post by:
Hi - I am seeing some performance degradation when I am loading a control dynamically onto a page with multiple other dynamical controls using Page.LoadControl versus dragging and dropping it onto an individual page. Page1.aspx.cs UserControl uc = Page.LoadControl("../UserControls/UserControl1.ascx") Page2.aspx
0
1514
by: Phl | last post by:
Hi, I am trying to create an webform which loads usercontrols dyanamically. I know exactly what to load for some of these controls but for some, I dont want to load it until the user has press a button. The controls which I know I will need at page init gets their viewstate contents back properly per postback. However I am having a lot of troubles with keeping the contents of usercontrols which are
1
1841
by: Bob Rock | last post by:
Hello, I'm new to ASP.NET and I've been looking into the topic of dynamically loading (typically accomplished with a LoadControl followed by a MyControl.Controls.Add()) both user controls and asp.net web controls. I searched for articles on the internet and in the end I must say that I'm confused. I read about issues related to: a.. events not firing
8
1701
by: | last post by:
I'm looking for some design guidance on a collection of projects I'm working on. The project involves a bunch of websites constructed out of a collection of user controls. Different user populations with different access rights and "roles" will be visiting the site. I will be using ASP.NET 2.0's membership, roles, and profiles stuff to manage access. User controls need to be visible or not visible depending on user role. In some...
2
7180
by: adiel_g | last post by:
I added a user control to a webform in Asp.net 2.0. I am also adding several other user controls to this webform. Now I am trying to find a way to stop the user controls from loading up when I call the webform. I could possibly have 10 user controls in this page and I would not want all of them to load up. I would like to control which user control loads up. I have tried placing each user control in a separate placeholder and then...
0
9297
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9904
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9735
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8736
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3828
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2697
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.