so i have this piece of code: function GetCompanyList (VAR cFront : TCFront; ServerName : String; LicenseFile : String; NavisionPath : String) : TStrings; VAR CmpList : TStrings; CurrCmp : String; begin CmpList := TStringList.Create(); if ConnectDB(cFront, ServerName, LicenseFile, NavisionPath) then begin CurrCmp := cFront.NextCompany(''); while CurrCmp <> '' do begin CmpList.Add(CurrCmp); CurrCmp := cFront.NextCompany(CurrCmp); end; Result := CmpList; end else CmpList.Add('<keine Verbindung zum Server>'); end;
but it freezes in the line with: CurrCmp := cFront.NextCompany(’’); any idea ?
Do you have checked connection to db ? It is OK ? Maybe no connection. Sometimes are problems in cfront with varibles, try this: Line: CurrCmp := cFront.NextCompany(’’); Change to: CurrCmp := ‘’; CurrCmp := cFront.NextCompany(CurrCmp);