Subject Re: [IBO] Problem with TIB_QUERY.LOCATE
Author maralex1949
Hello Hans:

Based on your reply I tried several other test programs, all
failed. Not understanding how yours could work but mine failed I
uninstalled and reinstalled Delphi, IBO, etc., because I couldn't
think of anything else that might cause this type of a problem. All
works correctly now. Thanks for responding.

Geno


--- In IBObjects@yahoogroups.com, Hans <hhoogstraat@...> wrote:
>
> Tried you example with
> IB_Database,IB_Query,IB_Datasourse and IB_Grid and it worked
flawless
> Then tried the same with
> IBODatabase,IBOQuery,Datasourse and DBGrid and it worked flawless
too
>
>
> ----- Original Message -----
> From: "maralex1949" <strtline@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Sunday, September 24, 2006 10:23 AM
> Subject: [IBO] Problem with TIB_QUERY.LOCATE
>
>
> > Hi:
> >
> > I have a application that I converted from Access. In the access
> > version the user can enter a student ID and I locate the student
as
> > follows:
> >
> > If qrStudents.Locate('StudentID',Entered Student ID,[]) Then
> > Begin
> > ....
> > End
> > Else
> > Begin
> > ....
> > End;
> >
> > This works fine. In the IBO version here is the problem:
> >
> > If a invalid StudentID is entered the Else is executed and all is
> > well. If a valid student ID is entered the databound edits on
the
> > form change showing that the record has changed per the locate
but the
> > code for a successful locate is never executed. To illiminate
the
> > possibility that it was something else in my application I
extracted
> > this code and have a program with only a databound grid and a
button
> > that executes the locate code when pressed.
> >
> > The code is as follows:
> >
> > If qrStudents.Locate('StudentID',1,[]) Then
> > Begin
> > Button1.Caption := 'Located';
> > Beep;
> > End
> > Else
> > Begin
> > Button1.Caption := 'Falied';
> > Beep;
> > End;
> >
> > If I enter a 1, which is a valid student ID the locate is
successful,
> > the databound grid pointer changes to student id 1 but the button
> > caption and beep never happen. If a change the number to 100,
which
> > is a invalid Student ID, the grid does not change but the button
> > caption and beep happen.
> >
> > Can anyone explain this?
> >
> > Thanks Geno
> >
> >
> >
> >
> >
> >
> >
> >
_____________________________________________________________________
______
> > IB Objects - direct, complete, custom connectivity to Firebird
or
> > InterBase
> > without the need for BDE, ODBC or any other layer.
> >
_____________________________________________________________________
______
> > http://www.ibobjects.com - your IBO community resource for Tech
Info
> > papers,
> > keyword-searchable FAQ, community code contributions and more !
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>