Building a selection set on the fly
Don Coleman
dcoleman at dgcreact.com
Thu Feb 24 11:48:59 PST 2005
Kenneth Brody wrote:
>Don Coleman wrote:
>[...]
>
>
>>*report errors out on the write use;close use located on line #30. Can
>>anyone see what I am doing wrong on lines 27-28 that is causing this
>>problem? The only difference is when filling in the use(5) field. I
>>manually set up the selection set and opened it with a text editor and
>>it looks as I would expect it to look. It passes the syntax check but
>>errors out at run-time with a memory error on multiple PC's. If field 9
>>ne "MTSP" the program still functions fine. fPv5.0.13 on Win98SE and XP
>>Pro clients, Win2000 Advanced Server. The sample code below is from the
>>-v (select) process.
>>
>>
>
>You'll have to contact fpsupport about the crash.
>
>However, since the field assignments are identical except for use(5), why
>write everything twice?
>
>Also, what happens if 9="MTSP", but AC is neither "A" or "D"?
>
>Also also, why use "{" to concatenate two literals, rather than simply
>make a single literal?
>
>[...]
> Then: export ascii use=(RF) f=\n
> Then: use(1)="" ; use(2)=":9:eq:"{AB ; use(3)=":150:eq:Y"
> Then: use(4)=":66:eq:"{@td;
>
>MTSP If: 9 eq "MTSP"
> Then:
> If: MTSP and AC eq "A"
> Then: use(5) = ":4:eq:JBP"
> If: MTSP and AC eq "D"
> Then: use(5) = ":4:ne:JBP"
> If: not MTSP
> Then: use(5) = ""
>
> Then: use(6)=":::";use(7)=":::";use(8)=":::";use(9)=":::"
> Then: use(10)=":::";use(11)=":::";use(12)=":::";use(13)=":::";use(14)=""
> Then: close use
>[...]
>
>
>
Ken:
Followed your suggestion and programmed 3 conditional lines for
use(5)=... and it no longer crashes. TY. AC is always equal to an "A"
or "D", otherwise the app. sends you back to ask that question again.
Removed all other reduncy plus changed to one literal as suggested.
Works fine, although I am still not sure what was causing the crash
previously. Thanks again.
Don Coleman
More information about the Filepro-list
mailing list