Subject | Re: [IBO] Locate() not working correctly |
---|---|
Author | stewartbourke |
Post date | 2004-02-03T23:39:02Z |
I seem to remember a known issue with locating on integers under
dialect 3 because they had changed the column type for integers
internally to bigint when IB6 came in. tamaracka for 'Interbase
bigint delphi' and you will find some reference to it.
I had this and it drove me mad. I fixed it by changing my key fields
to numeric(12,0) and it has worked since then... Perhaps not the
most elegant but it worked...
--- In IBObjects@yahoogroups.com, "Andreas Bednarek" <bluehorse@d...>
wrote:
_____
_____
dialect 3 because they had changed the column type for integers
internally to bigint when IB6 came in. tamaracka for 'Interbase
bigint delphi' and you will find some reference to it.
I had this and it drove me mad. I fixed it by changing my key fields
to numeric(12,0) and it has worked since then... Perhaps not the
most elegant but it worked...
--- In IBObjects@yahoogroups.com, "Andreas Bednarek" <bluehorse@d...>
wrote:
> Hi,then how
>
> > How is this possible? If the Locate() on 13975 is successful,
> cannot help
> > it immediately after be on a different record?
>
> I'm not sure if you got an answer already, this one will probably
> you :-( Just want to say that I also had this problem with Locateand
> FindNearest as well (IBO 4.2). The dataset was always pointing tocompletely
> irelevant records. I solved this using SELECT statement withIBOQuery
> instead of Locate/FindNearest with a Table. Interessant is, that itwas not
> buggy with all DB tables, just some. I never realised where theproblem
> could be...wrong record,
>
> Andreas
>
>
>
> ----- Original Message -----
> From: "Joe Martinez" <joe@j...>
> To: "IB Objects" <IBObjects@yahoogroups.com>
> Sent: Wednesday, January 28, 2004 9:15 AM
> Subject: [IBO] Locate() not working correctly
>
>
> > I have the following piece of code:
> >
> > TLocateOptions Opts;
> > Opts.Clear();
> > Variant locvalues[3];
> > locvalues[0] = Variant(theClassID);
> > locvalues[1] = Variant(theSectID);
> > locvalues[2] = Variant(theEnrollID);
> > SectEnrollsTable->Refresh();
> > bool LocateResult =
> > SectEnrollsTable->Locate("CLASSID;SECTIONID;ENROLLID",
> > VarArrayOf(locvalues, 2), Opts);
> > long NewKey = SectEnrollsTable->FieldByName("enrollid")-
>AsInteger;
> >
> > Note: SectEnrollsTable is a TIBOTable
> >
> > I was having problems where this code would often locate the
> > so I traced the execution of the code in the debugger (BCB4).13975. So,
> >
> > Right before this block of code, theEnrollID has a value of
> > that should be the key that it's looking for.13975.
> >
> > The Locate() call (2nd to last line) returns True.
> > After executing the last line, NewKey has a value of 3775, NOT
> >then how
> > How is this possible? If the Locate() on 13975 is successful,
> can______________________________________________________________________
> > it immediately after be on a different record?
> >
> > Help!
> >
> > -Joe
> >
> >
> >
>
_____
> > 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 TechInfo
> papers,
> > keyword-searchable FAQ, community code contributions and more !
> >
> > Yahoo! Groups Links
> >
> > To visit your group on the web, go to:
> > http://groups.yahoo.com/group/IBObjects/
> >
> > To unsubscribe from this group, send an email to:
> > IBObjects-unsubscribe@yahoogroups.com
> >
> > Your use of Yahoo! Groups is subject to:
> > http://docs.yahoo.com/info/terms/
> >
> >