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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Deleting Objects

Deleting Objects

Scheduled Pinned Locked Moved Visual Basic
c++databasetutorialquestion
5 Posts 4 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.
  • D Offline
    D Offline
    Daniel Kanev
    wrote on last edited by
    #1

    Hi all, I am thinking of how objects are deleted in Visual Basic 6. I am now using ADO for DB operations and I am not sure if my program clears objects correctly. I use the following code for creating a recordset --------START------------ Dim RecSet as New ADODB.Recordset 'Execute query here RecSet.Close -------END---------------- That's it. I do not know how to proceed further with releasing the object. In Visual C++ I just call the Release Method of the Recordset pointer and everything is fine. Does Visual Basic automatically clear the object for me? Thank you!

    N T V D 4 Replies Last reply
    0
    • D Daniel Kanev

      Hi all, I am thinking of how objects are deleted in Visual Basic 6. I am now using ADO for DB operations and I am not sure if my program clears objects correctly. I use the following code for creating a recordset --------START------------ Dim RecSet as New ADODB.Recordset 'Execute query here RecSet.Close -------END---------------- That's it. I do not know how to proceed further with releasing the object. In Visual C++ I just call the Release Method of the Recordset pointer and everything is fine. Does Visual Basic automatically clear the object for me? Thank you!

      N Offline
      N Offline
      Naji El Kotob
      wrote on last edited by
      #2

      Hi, The last step could be: RecSet = Nothing Hope this helps :)

      NajiCo http://www.InsideVB.NET[^] It's nice 2b important, but it's more important 2b nice...

      1 Reply Last reply
      0
      • D Daniel Kanev

        Hi all, I am thinking of how objects are deleted in Visual Basic 6. I am now using ADO for DB operations and I am not sure if my program clears objects correctly. I use the following code for creating a recordset --------START------------ Dim RecSet as New ADODB.Recordset 'Execute query here RecSet.Close -------END---------------- That's it. I do not know how to proceed further with releasing the object. In Visual C++ I just call the Release Method of the Recordset pointer and everything is fine. Does Visual Basic automatically clear the object for me? Thank you!

        T Offline
        T Offline
        Tom Deketelaere
        wrote on last edited by
        #3

        when coding in vb6 I always use the following to make sure all objects are cleared dim recset as new adodb.recordset ... recset.close recset=nothing

        1 Reply Last reply
        0
        • D Daniel Kanev

          Hi all, I am thinking of how objects are deleted in Visual Basic 6. I am now using ADO for DB operations and I am not sure if my program clears objects correctly. I use the following code for creating a recordset --------START------------ Dim RecSet as New ADODB.Recordset 'Execute query here RecSet.Close -------END---------------- That's it. I do not know how to proceed further with releasing the object. In Visual C++ I just call the Release Method of the Recordset pointer and everything is fine. Does Visual Basic automatically clear the object for me? Thank you!

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #4

          Yes man it will help, they are right, set everything to nothing

          Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com

          1 Reply Last reply
          0
          • D Daniel Kanev

            Hi all, I am thinking of how objects are deleted in Visual Basic 6. I am now using ADO for DB operations and I am not sure if my program clears objects correctly. I use the following code for creating a recordset --------START------------ Dim RecSet as New ADODB.Recordset 'Execute query here RecSet.Close -------END---------------- That's it. I do not know how to proceed further with releasing the object. In Visual C++ I just call the Release Method of the Recordset pointer and everything is fine. Does Visual Basic automatically clear the object for me? Thank you!

            D Offline
            D Offline
            Daniel Kanev
            wrote on last edited by
            #5

            Thank you guys, I will try it :)

            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