CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 1999
    Location
    Chennai(INDIA)
    Posts
    11

    Properties: Are they costly?

    In project we are using IIS with MTS(Its a web based project which we are developing in ASP and COM(Developed using VB) with SQL Server/Oracle.

    We are using the components only to access database.

    In the class we first defined property procedures and methods. The component users(from any application) should set the property values and call the methods each time(there are more than 10 properties whose values are set before calling a method).

    As an alternate we defined some methods which takes data as parameter without using properties. Meaning component users does't set the property values instead they sent the values as a paramters of the methods.

    Kindly suggest which is better with reason.


    Thanks in advance.


    VMK
    [email protected]
    [email protected]



  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Properties: Are they costly?

    Properties on objects are great on a single user machine - but as you've discovered, they can cause a lot of network traffic. I've found it better to use disconnected (ADO) recordsets in method calls across a network (or XML strings), this way you can pass all the data in one go and have each object pack/unpack it as required.


    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

  3. #3
    Join Date
    Jul 1999
    Posts
    145

    Re: Properties: Are they costly?

    Two other options to the disconnected recordset are to use arrays, or UDT's in conjunction with LSet.

    From what I've read, passing large numbers of arguments to a procedure is not the way to go. Why? Sorry, don't know.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured