Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. The Recordset Fields property/collection

The Recordset Fields property/collection

Scheduled Pinned Locked Moved Visual Basic
performancetutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cliff Wellman
    wrote on last edited by
    #1

    Can anyone remember if there is a performance difference between using a recordset's Fields property or referencing it by default. I thought that I read something about them being different, but I can't find any documentation on it. Please see my example below. Dim rs as ADODB.Recordset dim sText as String ... sText = rs.Fields("MY_TEXT") OR sText = rs("MY_TEXT") I'm using VB6

    D 1 Reply Last reply
    0
    • C Cliff Wellman

      Can anyone remember if there is a performance difference between using a recordset's Fields property or referencing it by default. I thought that I read something about them being different, but I can't find any documentation on it. Please see my example below. Dim rs as ADODB.Recordset dim sText as String ... sText = rs.Fields("MY_TEXT") OR sText = rs("MY_TEXT") I'm using VB6

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      There shouldn't be any performance difference at all. Are you experiencing any differences? On top of that, using the default proprty is poor programming practice. It just makes your project more difficult to convert to VB.NET in the future. RageInTheMachine9532

      C 1 Reply Last reply
      0
      • D Dave Kreskowiak

        There shouldn't be any performance difference at all. Are you experiencing any differences? On top of that, using the default proprty is poor programming practice. It just makes your project more difficult to convert to VB.NET in the future. RageInTheMachine9532

        C Offline
        C Offline
        Cliff Wellman
        wrote on last edited by
        #3

        Thanks, I'm taking over a contract where the main goal is to clean up the code and make it more maintainable (and get it ready for .NET). I've been primarily working with Java and C++ for the last 4 or 5 years, so things are obviously different. Anyway, I've come across a lot of code that used default properties and before going in there and changin a bunch of stuff I wanted to make sure I had good reason. Thanks.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups