Board index » delphi » IBX 4.2 - Locate-BUG ??

IBX 4.2 - Locate-BUG ??

hi,

i use delphi 5 sp1 and ibx 4.2 (transaction,database,table)

this locate returns always "true" and select the last record of the
database.
in reality the locate don't fit on any record !!!!

is this a bug or am i wrong ??

if table_demo.Locate('TYP;ERLEDIGT', VarArrayOf([TYP,0]), []) then
begin
       ..........
end;

tanks
heiner

 

Re:IBX 4.2 - Locate-BUG ??


Probably a bug.  There has been no work on the Locate function over the past 8
months due to no bug reports on it.  I doubt many people use locate because with
the BDE it was a bad function in C/S environments.

Quote
Heiner Weilandt wrote:

> hi,

> i use delphi 5 sp1 and ibx 4.2 (transaction,database,table)

> this locate returns always "true" and select the last record of the
> database.
> in reality the locate don't fit on any record !!!!

> is this a bug or am i wrong ??

> if table_demo.Locate('TYP;ERLEDIGT', VarArrayOf([TYP,0]), []) then
> begin
>        ..........
> end;

> tanks
> heiner

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
The fool escaped from paradise will look over his shoulder and cry
Sit and chew on daffodils and struggle to answer why?
As you grow up and leave the playground
Where you kissed your Prince and found your frog
Remember the jester that showed you tears, the script for tears. (Fish)

Re:IBX 4.2 - Locate-BUG ??


Hi:

  I use locate all the time with BCB/IB6/IBX and it works fine:

         MainDM->IBM->Close();
         MainDM->IBM->SelectSQL->Clear();
         MainDM->IBM->SelectSQL->Add("SELECT * FROM MEMBERS");
         MainDM->IBM->SelectSQL->Add("ORDER BY DBA ASC");
         MainDM->IBM->Open();

         LookFor = BusToFind->Text;
         while ((LookFor.Length()>0) && (!MainDM->IBM->Locate("DBA",
                                          LookFor, LocateOptions)))
           {
            LookFor = LookFor.SubString(1,LookFor.Length()-1);
            BusToFind->Text = LookFor;
            BusToFind->Refresh();
           }
         if (LookFor.Length() == 0)
           {
            Application->MessageBox("The business name could not be
located "
                                    "in the Database. Please check the
name "
                                    "and try again.",
                                    "Locate Member by Business Name",
                                     MB_OK | MB_ICONEXCLAMATION);
            return;
           }

Re:IBX 4.2 - Locate-BUG ??


I have another bug with locate (D5E with Update, IB 6.01, TIBTable). There some
misterious problem:
I using locate('field',value,[]) where field type integer with primary key(withiut
primary key the same). Values from 305100 to 305699. For every value I use locate
and just for 305102 locate return false. That field exist and I see them in table.
That can't be uncommited - all commited. In debug mode I see that function
InternalLocate after value 305101 after Next skip to 305103, but all fields appended
in direction from 305100 to 305699 programmaticaly. That not "magic" value, because
in other table all working. After dropping table, recreating and filling bug stay.
I use
        for i:=1 to AbonArraySize do
        begin
          if IbTableDolg.Locate('AB_NUMBER',AbonArray[i].Ab_Number,[])then
                  begin
                            ......
                   end;
        end;
Look for "DolgTable.zip" in Attachments.
And why in InternalLocate you all time assign val:=KeyValues with every iteration -
once not enough?
Quote
"Jeff Overcash (TeamB)" wrote:
> Probably a bug.  There has been no work on the Locate function over the past 8
> months due to no bug reports on it.  I doubt many people use locate because with
> the BDE it was a bad function in C/S environments.

> Heiner Weilandt wrote:

> > hi,

> > i use delphi 5 sp1 and ibx 4.2 (transaction,database,table)

> > this locate returns always "true" and select the last record of the
> > database.
> > in reality the locate don't fit on any record !!!!

> > is this a bug or am i wrong ??

> > if table_demo.Locate('TYP;ERLEDIGT', VarArrayOf([TYP,0]), []) then
> > begin
> >        ..........
> > end;

> > tanks
> > heiner

> --
> Jeff Overcash (TeamB)
>       (Please do not email me directly unless  asked. Thank You)
> The fool escaped from paradise will look over his shoulder and cry
> Sit and chew on daffodils and struggle to answer why?
> As you grow up and leave the playground
> Where you kissed your Prince and found your frog
> Remember the jester that showed you tears, the script for tears. (Fish)

Other Threads