Database not updating after using insert on submit with linq.
-
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.
-
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.
I am not very sure about this.... Is ur Database have auto commit option??? If not commit the transaction first Good Luck