Visuall Data Objects

F

Fabiano

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
 
J

Jeffrey Tan[MSFT]

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/default.asp?url=/library/en-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.com/ado_net_performance.asp

"Maximize the Performance of Your ADO.NET Applications "
http://archive.devx.com/dbzone/articles/dd_adoperf/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.
 
J

Jeffrey Tan[MSFT]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top