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. C#
  4. Not getting Output parameter value

Not getting Output parameter value

Scheduled Pinned Locked Moved C#
questiondatabase
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.
  • H Offline
    H Offline
    Hum Dum
    wrote on last edited by
    #1

    Enterprise Library ExecuteDataSet method not setting Output parameter value. The value of output parameter is always null.

    using (DbCommand cmd = db.GetStoredProcCommand("s_sProcName"))
    {
    DataSet ds = new DataSet()
    db.AddInParameter(cmd, "@p_sFoo", DbType.String, "Bar");
    db.AddOutParameter(cmd, "@po_iOut", DbType.Int32, 4)
    ds = db.ExecuteDataSet(cmd);
    }

    How can i get value of Output parameter? Can any one please !!

    R 1 Reply Last reply
    0
    • H Hum Dum

      Enterprise Library ExecuteDataSet method not setting Output parameter value. The value of output parameter is always null.

      using (DbCommand cmd = db.GetStoredProcCommand("s_sProcName"))
      {
      DataSet ds = new DataSet()
      db.AddInParameter(cmd, "@p_sFoo", DbType.String, "Bar");
      db.AddOutParameter(cmd, "@po_iOut", DbType.Int32, 4)
      ds = db.ExecuteDataSet(cmd);
      }

      How can i get value of Output parameter? Can any one please !!

      R Offline
      R Offline
      RichardGrimmer
      wrote on last edited by
      #2

      You are actually giving it an output value in your SP aren't you? That one's caught me out before!

      C# has already designed away most of the tedium of C++.

      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