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 rows to a dataset.

Adding rows to a dataset.

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

    This is a simple yet strange (to me) problem.In one project I can add rows to a dataset by: Dataset created dsWaterReadings and datatable inside it dtWater. dsWaterReadings.dtWater.Rows.Add("value1", "value2") In the other project I have created the same dsWaterReadings and dtWater Now if I type: dsWaterReadings.dtWater it forces me to chose dtWaterDataTable and that does not have a rows property. Using dtWaterRow yeilds even less properties. What could the difference be. All references are idential apart from System.Configuration (which I dont think is the problem) Many thanks Andrew

    T 1 Reply Last reply
    0
    • J jinxster

      This is a simple yet strange (to me) problem.In one project I can add rows to a dataset by: Dataset created dsWaterReadings and datatable inside it dtWater. dsWaterReadings.dtWater.Rows.Add("value1", "value2") In the other project I have created the same dsWaterReadings and dtWater Now if I type: dsWaterReadings.dtWater it forces me to chose dtWaterDataTable and that does not have a rows property. Using dtWaterRow yeilds even less properties. What could the difference be. All references are idential apart from System.Configuration (which I dont think is the problem) Many thanks Andrew

      T Offline
      T Offline
      Tiyani Miyambo
      wrote on last edited by
      #2

      ensure that you have the datatable adapter define in your program so it can bring forward the table you want to add rows on for example dim da as new da.DBdataadapter.table dim dt as new dt.datasettable this will ensure you can call anytable on your database

      J 1 Reply Last reply
      0
      • T Tiyani Miyambo

        ensure that you have the datatable adapter define in your program so it can bring forward the table you want to add rows on for example dim da as new da.DBdataadapter.table dim dt as new dt.datasettable this will ensure you can call anytable on your database

        J Offline
        J Offline
        jinxster
        wrote on last edited by
        #3

        Thank you Tiyani

        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