Home > Archive > FoxPro Help and Support > October 2005 > VFP 9. Buffering?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author VFP 9. Buffering?
Ioannis Stefis

2005-10-27, 8:34 am

Hi!

In myproject, I use a form with only a table in the dataenvirontment, for
example myinitialtable.dbf. With clicking a CommandButton on the form I run
a file.prg program outside the form, but containing in the project, that
uses the myinitialtable.dbf in other working areas, as also other tables
from the same database. The program performs a lot of operations and changes
the values of some fields in myinitialtable.dbf AND do not close the form
and the myinitialtable.dbf.
After the execution of the program I cannot see on the form the values that
have been changed in the myinitialtable.dbf. When I click the exit button of
the form, I take the message "The data have been changed by another user,
save changes?" I proceed with 'yes' and rerun the form. Everything is all
right, the fields have been updated. I have checked thoroughly the
algorithms of the executed program through the CommandButton of the Form and
also from the command window. It works perfectly.
I tried with thisform.refresh, TABLEUPDATE, some kind of BUFFERING but I
quickly became confusing.
Is there any solution to this problem, to see the changed values of some
fields without exiting the form?

Many thanks again

Stefis Ioannis



Fred Taylor

2005-10-27, 8:34 am

It all depends. If you're using a view, you may need to do
REQUERY("yourviewname") before you do the form refresh.

--
Fred
Microsoft Visual FoxPro MVP


"Ioannis Stefis" <stefsin@otenet.gr> wrote in message
news:%231JsyRp0FHA.3660@TK2MSFTNGP15.phx.gbl...
> Hi!
>
> In myproject, I use a form with only a table in the dataenvirontment, for
> example myinitialtable.dbf. With clicking a CommandButton on the form I
> run
> a file.prg program outside the form, but containing in the project, that
> uses the myinitialtable.dbf in other working areas, as also other tables
> from the same database. The program performs a lot of operations and
> changes
> the values of some fields in myinitialtable.dbf AND do not close the form
> and the myinitialtable.dbf.
> After the execution of the program I cannot see on the form the values
> that
> have been changed in the myinitialtable.dbf. When I click the exit button
> of
> the form, I take the message "The data have been changed by another user,
> save changes?" I proceed with 'yes' and rerun the form. Everything is all
> right, the fields have been updated. I have checked thoroughly the
> algorithms of the executed program through the CommandButton of the Form
> and
> also from the command window. It works perfectly.
> I tried with thisform.refresh, TABLEUPDATE, some kind of BUFFERING but I
> quickly became confusing.
> Is there any solution to this problem, to see the changed values of some
> fields without exiting the form?
>
> Many thanks again
>
> Stefis Ioannis
>
>
>



Ioannis Stefis

2005-10-27, 8:34 am

Thanks Fred! I'll try it. Actually I use a table and a form created by the
forxpro wizard.. Any other trick?
Stefis

"Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
news:O7fXLLt0FHA.2312@TK2MSFTNGP14.phx.gbl...
> It all depends. If you're using a view, you may need to do
> REQUERY("yourviewname") before you do the form refresh.
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "Ioannis Stefis" <stefsin@otenet.gr> wrote in message
> news:%231JsyRp0FHA.3660@TK2MSFTNGP15.phx.gbl...
for[color=darkred]
form[color=darkred]
button[color=darkred
]
user,[color=darkred]

all[color=darkred]
>
>



Fred Taylor

2005-10-27, 8:34 am

First off, you may not want to use the wizard generated forms as there is a
fairly substantial amount of code in there that you'd probably never need.
The wizard generated forms can be used to study how to do something, but
overall, they're too bloated in trying to be "general purpose".

--
Fred
Microsoft Visual FoxPro MVP


"Ioannis Stefis" <stefsin@otenet.gr> wrote in message
news:uXBv5jA1FHA.560@TK2MSFTNGP12.phx.gbl...
> Thanks Fred! I'll try it. Actually I use a table and a form created by the
> forxpro wizard.. Any other trick?
> Stefis
>
> "Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
> news:O7fXLLt0FHA.2312@TK2MSFTNGP14.phx.gbl...
> for
> form
> button
> user,
> all
>
>



Craig Berntson

2005-10-27, 8:34 am

You may want to check out Andy's blog entry on buffering.
http://weblogs.foxite.com/andykrame.../10/18/948.aspx

--
Craig Berntson
MCSD, Visual FoxPro MVP
www.craigberntson.com
Salt Lake City Fox User Group
www.slcfox.org
www.foxcentral.net


"Ioannis Stefis" <stefsin@otenet.gr> wrote in message
news:%231JsyRp0FHA.3660@TK2MSFTNGP15.phx.gbl...
> Hi!
>
> In myproject, I use a form with only a table in the dataenvirontment, for
> example myinitialtable.dbf. With clicking a CommandButton on the form I
> run
> a file.prg program outside the form, but containing in the project, that
> uses the myinitialtable.dbf in other working areas, as also other tables
> from the same database. The program performs a lot of operations and
> changes
> the values of some fields in myinitialtable.dbf AND do not close the form
> and the myinitialtable.dbf.
> After the execution of the program I cannot see on the form the values
> that
> have been changed in the myinitialtable.dbf. When I click the exit button
> of
> the form, I take the message "The data have been changed by another user,
> save changes?" I proceed with 'yes' and rerun the form. Everything is all
> right, the fields have been updated. I have checked thoroughly the
> algorithms of the executed program through the CommandButton of the Form
> and
> also from the command window. It works perfectly.
> I tried with thisform.refresh, TABLEUPDATE, some kind of BUFFERING but I
> quickly became confusing.
> Is there any solution to this problem, to see the changed values of some
> fields without exiting the form?
>
> Many thanks again
>
> Stefis Ioannis
>
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com