Hi,
I have some code like this:
Function GetTypeFromTableName(ByVal _TableName As String, ByVal _DataContext As DataContext)
Dim Mytype As Type = (From t In _DataContext.Mapping.GetTables Where t.TableName = "dbo." + _TableName Select t.RowType.Type).SingleOrDefault
Return Mytype
End Function
Dim DBA As New LINQDataContext
_TBLName="City"
TableType = GetTypeFromTableName(_TBLName, DBA)
CallByName(obj, "Code", CallType.Set,1)
Dim Equery = From T In DBA.GetTable(TableType) Select T
Equery = Equery.Where(Function(Oj1) Oj1 Is obj)
Dim oopp = From t In Equery Select CallByName(t, "CName", CallType.Get, Nothing)
oopp.ToList.Item(0) = Txt_Name.Text
DBA.SubmitChanges()
SubmitChanges do not work. What is wrong?