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. Creating a stand alone Datarow, without the DataTable

Creating a stand alone Datarow, without the DataTable

Scheduled Pinned Locked Moved Database
businesstutorialquestionannouncement
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.
  • T Offline
    T Offline
    Tristan Rhodes
    wrote on last edited by
    #1

    I've been perplexed by this for a while now, and have found no real solution. I cannot find a way to create a stongly typed DataRow, without first creating a DataTable, which i don't want to do. Basicaly, i want to wrap my business object around a datarow, so that it can be used with a data table, without exposing the table and adapter to the external code, and using the datarow to enforce the validation initialy. Can anyone give me any pointers as to how to do this? I've tried a number of ways and been blocked by various caveats. Cheers Tris [Update] I'm thinking about using a single instance of each type of data table as a row factory, and wrap them in a static class with static members. Can anyone comment on the thread safety of this approach?

    R 1 Reply Last reply
    0
    • T Tristan Rhodes

      I've been perplexed by this for a while now, and have found no real solution. I cannot find a way to create a stongly typed DataRow, without first creating a DataTable, which i don't want to do. Basicaly, i want to wrap my business object around a datarow, so that it can be used with a data table, without exposing the table and adapter to the external code, and using the datarow to enforce the validation initialy. Can anyone give me any pointers as to how to do this? I've tried a number of ways and been blocked by various caveats. Cheers Tris [Update] I'm thinking about using a single instance of each type of data table as a row factory, and wrap them in a static class with static members. Can anyone comment on the thread safety of this approach?

      R Offline
      R Offline
      Riaan Booyzen
      wrote on last edited by
      #2

      hey there, have you tried System.Data.DataRow myDataRow; Riaan Booyzen

      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