manivineet
asked on
cannot update value - LINQ
I want update a property in a table (i' am using MS SQL server database) , but it get this error
" THIS PROPERTY IS READONLY"
how do i fix this?
also when I declare a new linq database instance,
Dim Db As New SageEMSArchiveDataContext
I only get 4 overidable properties (normally this is 5)
I have
import system.linq
I have checked my references, also stangely another project(on my system) does not have this issue.
any idea why this happens?
" THIS PROPERTY IS READONLY"
how do i fix this?
also when I declare a new linq database instance,
Dim Db As New SageEMSArchiveDataContext
I only get 4 overidable properties (normally this is 5)
I have
import system.linq
I have checked my references, also stangely another project(on my system) does not have this issue.
any idea why this happens?
Dim Db As New SageEMSArchiveDataContext("Data Source=ADELN250;Initial Catalog=SageEMS;Integrated Security=True")
Dim tbFile = (From files In Db.tbFiles _
Select files.Filename, files.ArchiveLocation Where Filename = fName).ToList(0)
If Not tbFile Is Nothing Then
tbFile.ArchiveLocation = "asdf" 'AT THIS POINT I GET AN ERROR SAYING THAT THIS PROPERTY IS READONLY
End If
refer: http://stackoverflow.com/questions/95364/how-do-i-modify-a-readonly-linq-property shoud help you out.
ASKER
no that didn't help at all
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
well the problem was that my table didn't have primary key.