I am a novice Clipper programmer running a few programs for personal/office use. Several months ago I started experiencing crashes in one program.
Most commonly it is "DBCMD error 2001: Work area not in use" from ordlistcle(0). This will be at a "Set Index to <ntx> " line which follows a " Use <dbf> new ". I restart the program and it runs just fine, handling that line of code the next time without difficulty. It has happened randomly at multiple different "set index to " commands in different prg files over the last several months. In some instances I have written the code as one line: “Use <dbf> index <ntx> new” If it crashes on that line I see “DBCMD error 2001: Work area not in use” from ordlistadd() instead of ordlistcle(). (I am not really familiar with these “behind the scenes” Clipper functions of ordlistcle and ordlistadd but I can guess they are handling the index files.)
Less commonly the error is "DBFNTX 1020 Work area not indexed" from dbseek(0). This error is at a “Seek....” command following “Use <dbf> new...set index to <ntx>”. Again when I restart the program it handles that same line of code without difficulty.
I am using Clipper 5.2 with the 5.2d patch.
So what is going wrong?
Most commonly it is "DBCMD error 2001: Work area not in use" from ordlistcle(0). This will be at a "Set Index to <ntx> " line which follows a " Use <dbf> new ". I restart the program and it runs just fine, handling that line of code the next time without difficulty. It has happened randomly at multiple different "set index to " commands in different prg files over the last several months. In some instances I have written the code as one line: “Use <dbf> index <ntx> new” If it crashes on that line I see “DBCMD error 2001: Work area not in use” from ordlistadd() instead of ordlistcle(). (I am not really familiar with these “behind the scenes” Clipper functions of ordlistcle and ordlistadd but I can guess they are handling the index files.)
Less commonly the error is "DBFNTX 1020 Work area not indexed" from dbseek(0). This error is at a “Seek....” command following “Use <dbf> new...set index to <ntx>”. Again when I restart the program it handles that same line of code without difficulty.
I am using Clipper 5.2 with the 5.2d patch.
So what is going wrong?