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. Database not updating after using insert on submit with linq.

Database not updating after using insert on submit with linq.

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasevisual-studiolinqannouncement
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
    TechnoDev
    wrote on last edited by
    #1

    Hi Folks I have this basic code. Dim db As New MyLinqDataContext Dim o As New Order o.OrderName = "Cool Order" db.Orders.InsertOnSubmit(o) db.SubmitChanges() db.Connection.Close() (I originally have tried this on C#) I have an orderid column which serves as a primary key which should update automatically when i insert the record. When the code runs there is no record but the database is not updated. Anyone else having issues with this. Im using the express versions of visual studio 2008. thx in advance.

    N 1 Reply Last reply
    0
    • T TechnoDev

      Hi Folks I have this basic code. Dim db As New MyLinqDataContext Dim o As New Order o.OrderName = "Cool Order" db.Orders.InsertOnSubmit(o) db.SubmitChanges() db.Connection.Close() (I originally have tried this on C#) I have an orderid column which serves as a primary key which should update automatically when i insert the record. When the code runs there is no record but the database is not updated. Anyone else having issues with this. Im using the express versions of visual studio 2008. thx in advance.

      N Offline
      N Offline
      nishkarsh_k
      wrote on last edited by
      #2

      I am not very sure about this.... Is ur Database have auto commit option??? If not commit the transaction first Good Luck

      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