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. Web Development
  3. ASP.NET
  4. Save expression column in database

Save expression column in database

Scheduled Pinned Locked Moved ASP.NET
databasehelpquestion
1 Posts 1 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
    AlexeiXX3
    wrote on last edited by
    #1

    Hi, thanks for looking Im having a problem with my dataset I have an Orders table and a details table I want to save the total of the order in the orders table My dataset has the same exact structure as my db tables Orders: OrderID Total Details: DetailID OrderID ProductID Price When i try to save (using tableadaptermanager) im having problems At first, i would get an error saying "The column mapping from SourceColumn 'Total' failed because the DataColumn 'Total' is a computed column.", So i removed the expression column before saving But now, a 0.00 is being saved in the Total column in the DB The best solution i see is removing the expression and iterate throug the orders table and recalculate the total manually Any suggestions?? (Besides doing it manually :) Thanks in advance

    Alexei Rodriguez

    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