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. COM
  4. Using NULL to Close the DB connection after Close()

Using NULL to Close the DB connection after Close()

Scheduled Pinned Locked Moved COM
database
2 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.
  • R Offline
    R Offline
    ragavan
    wrote on last edited by
    #1

    Hi I open a DB connection using the _ConnectionPtr pointer. After using the connection I call the Close() and set the pointer to NULL. When I set the pointer to NULL an exception is generated. Pleae let me know is it really required to set the object to NULL after Close(). Thanks in Advance

    M 1 Reply Last reply
    0
    • R ragavan

      Hi I open a DB connection using the _ConnectionPtr pointer. After using the connection I call the Close() and set the pointer to NULL. When I set the pointer to NULL an exception is generated. Pleae let me know is it really required to set the object to NULL after Close(). Thanks in Advance

      M Offline
      M Offline
      myshketer
      wrote on last edited by
      #2

      I found an example in MSDN 2003 where NULL setting object omited. The sample name is "ConnectionString, ConnectionTimeout, and State Properties Example (VC++)"

      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