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. Dataset copy

Dataset copy

Scheduled Pinned Locked Moved C#
csharpcssdatabasequestionannouncement
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
    Small Rat
    wrote on last edited by
    #1

    hi, I create a dataset and fill it with access database. everything is fine, I can see the data in the binded grid control. but i have an exception when I do the copy operation. the exception says, the dataset can not pass the constrains (non null, foreign key...). I think I can not create the first dataset if the data is wrong? does anyone have idea about this? Thanks a lot! Alan Shen MCAD for .NET Version ^~^~^~^~^~^~^~^~^~^~^ Great idea is the beginging of success!

    J 1 Reply Last reply
    0
    • S Small Rat

      hi, I create a dataset and fill it with access database. everything is fine, I can see the data in the binded grid control. but i have an exception when I do the copy operation. the exception says, the dataset can not pass the constrains (non null, foreign key...). I think I can not create the first dataset if the data is wrong? does anyone have idea about this? Thanks a lot! Alan Shen MCAD for .NET Version ^~^~^~^~^~^~^~^~^~^~^ Great idea is the beginging of success!

      J Offline
      J Offline
      Josh Smith
      wrote on last edited by
      #2

      DataTable has two methods, BeginLoadData and EndLoadData, which can be used when copying data into the table to prevent constraints from being enforced temporarily. Try using those when copying the data. :josh: My WPF Blog[^]

      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