Groups > Asp .Net > Data Access and ObjectDataSource Control > Re: LINQ .SubmitChanges not updating SQL DB




LINQ .SubmitChanges not updating SQL DB

LINQ .SubmitChanges not updating SQL DB
Thu, 3 Apr 2008 11:54:41 +0000
New to LINQ - following tutorial video word for word but my SQL DB is not
updating.

Here is my code

 Dim db As New linqJobsDataContext

 Dim j1 = (From j In db.Jobs _
 Where j.JobID.StartsWith("2007013") _
 Select j).Single

 j1.Title = "abc123"
 db.SubmitChanges()



THANKS!!
Post Reply
Re: LINQ .SubmitChanges not updating SQL DB
Thu, 3 Apr 2008 16:23:20 +0000
Also, in debug mode the Jobs table IsReadOnly = True!!!! How do I make the table
editable???

 Thanks
Post Reply
Re: LINQ .SubmitChanges not updating SQL DB
Thu, 3 Apr 2008 16:34:03 +0000
I didn't have a primary key on my table. DUH Also had to drop the table class
and re-add after creating and saving the primary key.
Post Reply
about | contact