Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need serious help with buffering
Message
 
 
To
29/06/1998 18:07:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00112693
Message ID:
00112749
Views:
11
>I am getting lost with buffering and I cannot find any source that explains what is happening.
>
>I have a form with optimistic row buffering and I'm working off of one table. A simple data entry for customers, here is what happens:
>
>Form comes up fine. I hit the "lookup" button and I'm put on the customer number txtbox. I enter a value, my lookup displays a pick list, I select the customer, the browse list closes, I move the pointer in the customer table to the appropriate record and say thisform.refresh. All the txtboxes are now blank and so are the fields in the table !!!! No tableupdate() was issued. Here is how it looks:
>
>*-- Current work area is "customer"
>USE customer ALIAS a_cust IN 0 AGAIN
>
>*-- Note: I have a custom lookup program that always opens the lookup table AGAIN in another work area.
>
>SELECT a_cust
>
>IF !SEEK(this.value, 'a_cust')
> *-- Ask them to list or reenter
>ELSE
> *-- Value found
> this.value = a_cust->custno
> USE IN a_cust
> SELECT customer
> SEEK this.value
> *-- Everything is fine up to here
> thisform.refresh
>ENDIF
>
>What I now see on the screen is blank txtboxes and when I look in thne table, every field is blank. The only time I don't get th efields blanked is if I disconnect the controlsource of each txtbox before doing the lookup and then reassigning it after the value is picked from the pick list. I know this isn't how it's supposed to be done.
>
>I've got tons of VFP books and nothing really tells me what is going on with the buffering and how I could possibly update my data while using optimistic
buffering.
>
>Any clue as to what to do or what to read ??????

I guess your SEEK fails to go the desired record. Try to truncate This.value so that it will conform to the width of the table field you are referencing at.

SELECT tablename
ctext = SUBSTR(This.Value,1,FSIZE('fieldname'))

=SEEK(ctext,'tablename','fieldname')

Thisform.Refresh()
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Reply
Map
View

Click here to load this message in the networking platform