Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Visuall Data Objects

Reply
Thread Tools

Visuall Data Objects

 
 
Fabiano
Guest
Posts: n/a
 
      04-07-2004
Please,

what is the best practices about use a visual data object inside a web form?
I can use visually a Command, DataAdapter, Connection and others, but some
VB 6.0 friends says that use this object waste memory since all they are
created at the start of the page.

If i use it programatically i can create this object just when i need it.

What's is the best? I save so many memory doing it?

tks in adv.

Fabiano


 
Reply With Quote
 
 
 
 
Jeffrey Tan[MSFT]
Guest
Posts: n/a
 
      04-07-2004
Hi Fabiano,

Based on my understanding, you are concerning on the performance of the
ADO.net object.

I think the guys' suggestion mean that only do the data operation when
necessary.
For example, dataset is a connection-less data object in ADO.net, it will
contain all the inner data in the memory, which will cost the memory space.
So you may retrieve the DataSet only when necessary at certain time. Once
you need the DataSet, you may do like this:

DataSet ds=new DataSet();
SqlDataAdapter adapter=new SqlDataAdapter(sqlcommand, sqlconnectionstring);
adapter.Fill(ds);

Also, when you are using other connection active data operation, you should
DO remember to release(close) these objects, once the operation is over.

If you concern on the performance of ADO.net, please refer to;
"Comparison of ADO.NET and ADO"
http://msdn.microsoft.com/library/de...us/vbcon/html/
vbconadopreviousversionsofado.asp

Also, these 2 ADO.net performance articles may help you:
"ADO.NET and SQL Server Performance Tips "
http://www.sql-server-performance.co...erformance.asp

"Maximize the Performance of Your ADO.NET Applications "
http://archive.devx.com/dbzone/artic.../adoperf-1.asp

=========================================
Please apply my suggestion above and let me know if it helps resolve your
problem.

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

 
Reply With Quote
 
 
 
 
Jeffrey Tan[MSFT]
Guest
Posts: n/a
 
      04-09-2004
Hi Fabiano,

Does my reply makes sense to you? Do you still have any concern?

Please feel free to let me know, I will help you. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing data between objects and calling all objects of a class in turn ghoetker Python 1 08-25-2010 03:18 AM
class objects, method objects, function objects 7stud Python 11 03-20-2007 06:05 PM
memory settings, Microsoft visuall studio 2005 farshid.roumi@gmail.com C++ 5 01-09-2007 04:06 AM
design patterns: value objects vs. data transfer objects laredotornado@zipmail.com Java 1 08-29-2006 12:14 AM
CRT, Member Initialisation, static data, constant data, global objects Tim C++ 2 12-15-2003 07:15 PM



Advertisments