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. adding a new column to dataset which stores log values of another table

adding a new column to dataset which stores log values of another table

Scheduled Pinned Locked Moved Visual Basic
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.
  • A Offline
    A Offline
    Amanjot
    wrote on last edited by
    #1

    Hi, I am using dataset for playing with data and wanted to create an additional column that stores logarithm (log) of another column. I tried to use number of options including the one below but still have trouble making the program work. dtRec.Columns.Add("sumXY", Type.GetType("System.Double"), Math.Log("recflow")) recflow is an existing column of the dataset and I want log values of reflow to be stored in new sumXY column. Any suggestions!! Amanjot

    S 1 Reply Last reply
    0
    • A Amanjot

      Hi, I am using dataset for playing with data and wanted to create an additional column that stores logarithm (log) of another column. I tried to use number of options including the one below but still have trouble making the program work. dtRec.Columns.Add("sumXY", Type.GetType("System.Double"), Math.Log("recflow")) recflow is an existing column of the dataset and I want log values of reflow to be stored in new sumXY column. Any suggestions!! Amanjot

      S Offline
      S Offline
      Steve Erbach
      wrote on last edited by
      #2

      Amanjot, The way you've written the third parameter is, I think, incorrect. This might work instead: tRec.Columns.Add("sumXY", Type.GetType("System.Double"), "Math.Log(recflow)") Steve Erbach Neenah, WI http://TheTownCrank.blogspot.com

      A 1 Reply Last reply
      0
      • S Steve Erbach

        Amanjot, The way you've written the third parameter is, I think, incorrect. This might work instead: tRec.Columns.Add("sumXY", Type.GetType("System.Double"), "Math.Log(recflow)") Steve Erbach Neenah, WI http://TheTownCrank.blogspot.com

        A Offline
        A Offline
        Amanjot
        wrote on last edited by
        #3

        Thanks Steve. I tried the option you suggested; however, it didn't work. Thanks, Amanjot

        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