||Re: ApplyLocate error
Ken Mayer <firstname.lastname@example.org>
||Tue, 16 Jul 2019 22:01:42 -0700
On 7/16/2019 5:23 PM, Ruth Bromer wrote:
> I have a program to create a table to be used to create a report for the
> shirt screener. (Mervyn wrote the original program with some
> modifications from me.)
> Since I have to add a few shirt orders that aren't coming from my input
> csv file, I am adding them to the input file and then resorting the
> output table (TShirtSorted.dbf).
> The original Screener.prg uses the table, Packet.dbf as input. I want
> to use the TShirtSorted.dbf as input. They both have the same relevant
> fields, shirt size and shirt color. Most of the code is the same.
> The error message is:
> Database Engine Error: Operation not appicable.
> FIle: Screener.prg
> Routine: SCREENER
> Line: 70
> Where the program crashes is with the ApplyLocate command (line 70).
> if not t_orders1.rowset.applyLocate( "t_size = '" + cSize+ "' and
> t_color = '" + cColor +"'" )
> The fields cSize and cColor both have valid data.
When testing a statement like that, sometimes it is useful to build the
string and output it in the Command Window:
? "t_size = '" + cSize+ "' and > t_color = '" + cColor +"'"
Take a look at what you get.
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm