Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with TABLEUPDATE
Message
 
To
09/09/1998 17:08:57
Koos Veel
Gamma Research
Aruba
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00134814
Message ID:
00134840
Views:
17
While newly added records are still in the buffer (that is, you've added them to a table with table buffering but haven't used TABLUPEDATE() yet) they have negative RECNOs. Try REPLACE ... FOR RECNO()<0.

>Hello,
>
>We are using Visual FoxPro 5.0 and have stumbled upon a bit of a problem.
>
>We try to create a form where we enter information about a new user for the security. After we have filled in the information we want we save the entered information. We use optimistic table buffering for all our tables used in this form.
>
>We want to add the new user (this works okay) to the Users table and then want to append to another table (UserAcc) some information we find in UserFunc. However when we execute the following routine which we have under the SAVE button:
>
>---
>TABLEUPDATE(.T.)
>*
>SELECT UserAcc
>SET FILTER TO
>SET ORDER TO
>GO BOTTOM
>mRecNo = RECNO()
>APPEND FROM UserFunc
>*
>REPLACE ALL UserName WITH THISFORM.Sec_Pgf1.Page1.txtLogin.VALUE FOR RECNO() > mRecNo
>*
>TABLEUPDATE(.T.)
>----
>
>This way the new user does get added to the physical users table. And also there is an append to the useracc table. But the replace command isn't executed. Nothing is replaced at all. I tried the same thing in the command window and it works.
>
>Is this because table buffering is used? How can we solve this?
>
>Thanks in advance for your time and answer!
>
>Greetings,
>Michiel Willems
>Using the account of Koos Veel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform