FW: FW: Browse lookup - odd behavior
GCC Consulting
gcc at optonline.net
Sat Jul 17 12:41:52 PDT 2004
This is a forward of an e-mail to Ken which should have gone to the list also.
Richard Kreiss
GCC Consulting
> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com
> [mailto:filepro-list-bounces at lists.celestial.com] On Behalf Of Kenneth
> Brody
> Sent: Friday, July 16, 2004 12:47 PM
> To: Jay R. Ashworth
> Cc: Filepro 2 List; filePro tech support
> Subject: Re: FW: Browse lookup - odd behavior
>
> "Jay R. Ashworth" wrote:
> [...]
> > > Or are you suggesting actually re-running the lookup in
> its entirety?
> >
> > Doing anything else seems semantically inadequate, as this problem
> > demonstrates.
>
> After some investigation last night, it appears that I misrembered how
> the pkeep part of the browse lookup works.
>
> Upon re-executing the pkeep lookup, it is only the initial record
> whose position is cached. From there, the rest of the browse window
> is repopulated by scanning the file.
>
> While within the browse, the record numbers are cached so that
> scrolling within the window does not re-scan the file.
> Also, when scrolling off the end of the window, everything is shifted
> within the cache, and only the newly-vacated area is populated by
> continuing the scan of the file.
>
> Since my misremembering of the caching fit the symptoms being
> reported, I thought that I remembered correctly.
>
> Which brings us back to the OP's symptoms.
>
> We would need more specifics of what the index is built on, which
> record is being deleted, what is in the newly-created record that's
> replaced it, specifically the field(s) used to build that index, what
> records appear in the window upon re-executing the browse lookup, and
> perhaps some more information that I'm not thinking of at this moment.
OK
Configuration:
Server Win server 2003
Work Stations Win XP home addition (not my choice - no domain server)
Filepro 5.0.11 native runtime
Netgear 16 port unmanaged switch
Problem existed with 3Com 8 port hub.
Newly created record is from a new order being entered. This record will appear
at the top of the browse list.
More the likely, th new po # will be greater the 50 to 100 numbers higher then
the one being worked on.
Just to make life easier, here is the code I am using for this browse.
The delete uses the record # and does a write ord;sync ord after the deletion.
Since there may be a few hundred detail line, I can't say with any which
specific detail line was being deleted. But I don't think is was the first. I
do know this has happened when the last detail was deleted. Whether this is
what happened the last time it occurred, I can't say; but the new line appeared
as the first line of the browse on re-execution.
Index A - Order#(7,.0) & line #(3,zfill)
Index D - Order# & item#(5,#)
Index J - Order# & Description(45,*)
@keyl If: '*********************************
1 Then: '* lookup order details
If: 'set flag for @key pressed
2 Then: flag="99";where_from="@keyl"
3 Then: lookup ord = orders k=1 i=a -nx
If: NOT ord
4 Then: MSGBOX "No Details on File";END
5 Then: dim horder(4)
6 Then: horder["1"]="Sort by Order Sequence";horder["2"]="Sort by
Item#";horder["3"]="Invoice Sequence";horder["4"]="EXIT"
7 Then: f=listbox(horder)
If: f= "4"
8 Then: END
If: f = "1"
9 Then: SHOWCTR("19") "\b5 Sorting By Line # \a-"
If: f = "2"
10 Then: SHOWCTR("19") "\b5 Sorting By Item # \a-"
If: f = "3"
11 Then: SHOWCTR("19") "\b5 Sorting By Invoice Sequence \a-"
see_itm If: f le "3" or flag = "88"
12 Then: ba="(brw=15 xkey=XSUDFAC show=pkeep pop=ERN prc=ord_num
fill=asc,top)"
If: f = "5"
13 Then: ba="(brw=15 xkey=XSUDFAC show=pkeep pop=ERN mlen=8 prc=ord_num
fill=asc,top)"
14 Then: bb="[\b5Ord# Item# DESCRIPTION Quant Order
Shipped]"
15 Then: bc="*1 *2 *3 *4 *5"
lok_lin If:
16 Then: GOSUB key_sho
If: f = "1"
17 Then: lookup ord = orders k=1 i=A -nxm b=(ba&bb&bc)
If: f = "2" or flag = "88"
18 Then: lookup ord = orders k=1 i=D -nxm b=(ba&bb&bc)
If: f = "3"
19 Then: lookup ord = orders k=1 i=J -nxm b=(ba&bb&bc)
If: f = "5"
20 Then: lookup ord = orders k=lu i=D -nxm b=(ba&bb&bc)
If: @bk = "X" or @bk = "x" or @sk="BRKY" or @bk = "c"
21 Then: GOTO end_shp
If: @bk = "A"
22 Then: lv=purchase_order_number;GOTO lok_lin
If: @bk = "s" or @bk = "S"
23 Then: rn=ord(@rn);GOTO get_shp
If: @BK = "U" or @bk = "u"
24 Then: fh="0";rn=ord(@rn);GOTO up_rec
If: @BK = "D" or @bk = "d"
25 Then: fh=f;rn=ord(@rn);ln=ord(14);GOTO del_rec
If: @BK = "F" or @bk = "f"
26 Then: fh(1,.0)=f;GOTO get_itm
If: f ne "5"
27 Then: CLEARB;CLS("23","2");CLS("19","1");END
If: where_from = "@keyo" '* loop back and display all items in
item sequence
28 Then: CLEARB;CLS("19","1");f=fh;GOTO see_itm
If: where_from = "@keyl" '* loop back and display all items in
item sequence
29 Then: CLEARB;CLS("19","1");f=fh;GOTO lok_lin
ord_num If: '*************************************************************
30 Then: '* delete any details whose po number doesn't match header po #
If: ord(1) ne purchase_order_number
31 Then: DROP
32 Then: END
Richard Kreiss
GCC Consulting
More information about the Filepro-list
mailing list