Visuall Data Objects

Discussion in 'ASP .Net Web Controls' started by Fabiano, Apr 7, 2004.

  1. Fabiano

    Fabiano Guest

    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
    Fabiano, Apr 7, 2004
    #1
    1. Advertising

  2. 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.
    Jeffrey Tan[MSFT], Apr 7, 2004
    #2
    1. Advertising

  3. 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.
    Jeffrey Tan[MSFT], Apr 9, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim
    Replies:
    2
    Views:
    1,497
  2. Replies:
    1
    Views:
    579
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Aug 29, 2006
  3. Replies:
    5
    Views:
    359
    Jack Klein
    Jan 9, 2007
  4. 7stud
    Replies:
    11
    Views:
    676
    Dennis Lee Bieber
    Mar 20, 2007
  5. ghoetker
    Replies:
    1
    Views:
    369
Loading...

Share This Page