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. Database & SysAdmin
  3. Database
  4. Passing Null to the Image Datatype in SQL Server

Passing Null to the Image Datatype in SQL Server

Scheduled Pinned Locked Moved Database
tutorialdatabasesql-serversysadmin
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.
  • S Offline
    S Offline
    salman_syed_01
    wrote on last edited by
    #1

    How to pass NULL for the Image Datatype in SQL Server. For example we pass Null to int, string etc. Please tell me how is this possible for Image.

    T 1 Reply Last reply
    0
    • S salman_syed_01

      How to pass NULL for the Image Datatype in SQL Server. For example we pass Null to int, string etc. Please tell me how is this possible for Image.

      T Offline
      T Offline
      Talal Sultan
      wrote on last edited by
      #2

      You can try using the System.DBNull class. It has a property Value which represents a NULL value in the database. It would be like that:

      myDBVariable = DBNull.Value;

      Talal

      "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook

      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