This question is locked. New answers and comments are not allowed.
HI
when use this code:
Public subGetPerson() DbPerson.Load(Of TBLPersons1)(DbPerson.GetTBLPersons1Query.Where (Function(q) q.PERSONNO = _PersonNo), AddressOf ComplateGetPerson, Nothing) End sub Public Sub ComplateGetPerson(ByVal lo As LoadOperation) _dsPersons.Clear() For Each dr In lo.Entities _dsPersons.Add(dr) Next If _dsPersons.Count > 0 Then FullNameSelectPerson = _dsPersons.First.FIRSTNAME & " " & _dsPersons.First.LASTNAME & " in " & _dsPersons.First.VAHED Else FullNameSelectPerson = "" End If End Subloadopration Loaded
but when use this code:
Public Function GetPerson() As Boolean Dim Person As New TBLPersons1 Dim LO As LoadOperation(Of TBLPersons1) = DbPerson.Load(Of TBLPersons1)(DbPerson.GetTBLPersons1Query.Where(Function(q) q.PERSONNO = _PersonNo)) _dsPersons.Clear() For Each dr In LO.Entities _dsPersons.Add(dr) Next If _dsPersons.Count > 0 Then FullNameSelectPerson = _dsPersons.First.FIRSTNAME & " " & _dsPersons.First.LASTNAME & " In " & _dsPersons.First.VAHED Return True Else FullNameSelectPerson = "" Return False End If End FunctionLO is Empty.
plz help me