Search found 2 matches

by allegro
20.08.2008, 07:29
Forum: 6.6 - stable
Topic: about "ZQuery.Open"
Replies: 3
Views: 755

but this is ok.

Code: Select all

repeat 
... 
    TmpQuery := 'select name from ip2name where ipstart<' + nIP + ' and ipend>' + nIP + ';';
    ZQuery2.SQL.Clear;
    ZQuery2.SQL.Add(TmpQuery);
    ZQuery2.Open;
    aRegion := VarToStr(ZQuery2['name']);  // only one record 
... 
until ...
by allegro
20.08.2008, 07:20
Forum: 6.6 - stable
Topic: about "ZQuery.Open"
Replies: 3
Views: 755

about "ZQuery.Open"

Code: Select all

  ZQuery2.SQL.Clear;
  ZQuery2.SQL.Add('select name from ip where ipstart< :pIP and ipend> :pIP ;');

repeat
...
    ZQuery2.Params[0].AsInteger:=iIP;
    ZQuery2.OPen;
    aRegion := VarToStr(ZQuery2['name']);  // only one record
...
until ...
only return the result for first time, why?