Board index » delphi » Ttable.locate and "Record not found" error

Ttable.locate and "Record not found" error

I apologize in advance for this question as I am sure it is in a FAQ
file somewhere but I can't find it anywhere.

I am using Delphi 3 to access Oracle 7.3 through Borland SQL.  I am
trying to use the locate function to move my cursor to a given record
based on the field contents matching a string:

        Ttable1.locate('fieldname', stringvar, []);

This is supposed to return a boolean.  Instead, all I get is an
EDatabaseError "Record not found."  It doesn't matter whether the locate
statement stands on its own, as above, or whether I use a variable or an
if statement to receive the boolean result.

I've seen a couple of other postings on this question but I have not
seen a posting with an answer.

                                Thank you,
                                Mike

Standard Disclaimer:  These are my opinions, not my company's.

 

Re:Ttable.locate and "Record not found" error


an update on my question:

I put "loCaseInsensitive" in for a Search option parameter and I don't
get the error message anymore.  It still doesn't find a record which I
know to be present but I'll keep looking at my application.

Quote
Mike Buckman wrote:

> I apologize in advance for this question as I am sure it is in a FAQ
> file somewhere but I can't find it anywhere.

> I am using Delphi 3 to access Oracle 7.3 through Borland SQL.  I am
> trying to use the locate function to move my cursor to a given record
> based on the field contents matching a string:

>         Ttable1.locate('fieldname', stringvar, []);

> This is supposed to return a boolean.  Instead, all I get is an
> EDatabaseError "Record not found."  It doesn't matter whether the locate
> statement stands on its own, as above, or whether I use a variable or an
> if statement to receive the boolean result.

> I've seen a couple of other postings on this question but I have not
> seen a posting with an answer.

>                                 Thank you,
>                                 Mike

> Standard Disclaimer:  These are my opinions, not my company's.

Re:Ttable.locate and "Record not found" error


Have you tried also giving it the old loPartialKey ???

In article <34DF1F68.3...@collins.rockwell.com>,

Quote
  mjbuc...@collins.rockwell.com wrote:

> I apologize in advance for this question as I am sure it is in a FAQ
> file somewhere but I can't find it anywhere.

> I am using Delphi 3 to access Oracle 7.3 through Borland SQL.  I am
> trying to use the locate function to move my cursor to a given record
> based on the field contents matching a string:

>    Ttable1.locate('fieldname', stringvar, []);

> This is supposed to return a boolean.  Instead, all I get is an
> EDatabaseError "Record not found."  It doesn't matter whether the locate
> statement stands on its own, as above, or whether I use a variable or an
> if statement to receive the boolean result.

> I've seen a couple of other postings on this question but I have not
> seen a posting with an answer.

>                            Thank you,
>                            Mike

> Standard Disclaimer:  These are my opinions, not my company's.

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

Other Threads