Discussion:
Getting output to screen when running a form in VFP 9.0
(too old to reply)
Deborah
2006-09-04 15:26:49 UTC
Permalink
I recently started to use VFP 9.0. On one particular form I am running, I
get output on the screen like "Selected 63 records in 0.01 seconds" followed
by a list of the data that was selected. The only difference between this
form and the others I am using is that its dataenvironment is using two
views. I have played around with SET CONSOLE, but with inconsistent
results - sometimes I get the output to screen, sometimes I don't, and I
can't figure out how to stop it!

Can anyone please offer any suggestions or advice on how to stop this from
happening. I have never experienced it before in earlier versions of VFP -
but come to think of it, I never used views before!!

Many thanks - Debbie
Alex Feldstein
2006-09-04 19:01:08 UTC
Permalink
Post by Deborah
I recently started to use VFP 9.0. On one particular form I am running, I
get output on the screen like "Selected 63 records in 0.01 seconds" followed
by a list of the data that was selected. The only difference between this
form and the others I am using is that its dataenvironment is using two
views. I have played around with SET CONSOLE, but with inconsistent
results - sometimes I get the output to screen, sometimes I don't, and I
can't figure out how to stop it!
Can anyone please offer any suggestions or advice on how to stop this from
happening. I have never experienced it before in earlier versions of VFP -
but come to think of it, I never used views before!!
Place SET TALK OFF in the Load() method of the form.
Note that SET TALK OFF is scoped to the datasession.



PS: Please do not crosspost. Just post the question in the most
appropriate forum (progabky forms in this case)



Alex Feldstein
________________________________
Microsoft Visual FoxPro MVP

Please respond in the public groups so that everybody
can benefit from the exchange.
Favor de responder en los foros públicos asi todos se benefician.
(address munged with ROT-13)

Blog: http://alexfeldstein.blogspot.com
Website: http://www.feldstein.net
Dan Freeman
2006-09-04 19:05:38 UTC
Permalink
SET TALK OFF in your form's dataenvironment load method. The default is ON
and it's scoped to the Datasession (i.e. it's ON for each).

Dan
Post by Deborah
I recently started to use VFP 9.0. On one particular form I am
running, I get output on the screen like "Selected 63 records in 0.01
seconds" followed by a list of the data that was selected. The only
difference between this form and the others I am using is that its
dataenvironment is using two views. I have played around with SET
CONSOLE, but with inconsistent results - sometimes I get the output
to screen, sometimes I don't, and I can't figure out how to stop it!
Can anyone please offer any suggestions or advice on how to stop this
from happening. I have never experienced it before in earlier
versions of VFP - but come to think of it, I never used views before!!
Many thanks - Debbie
Debbie
2006-09-08 23:52:32 UTC
Permalink
All of my form classes are already coded with SET TALK OFF in the Load
method.

Out of curiosity, I added SET CONSOLE OFF to the DataEnvironment's Load
method and that seemed to fix my problem. But why or how I do not know
because when I test the setting of CONSOLE after the form has loaded it
returns ON!!! Does that make any sense to you?
Post by Dan Freeman
SET TALK OFF in your form's dataenvironment load method. The default is ON
and it's scoped to the Datasession (i.e. it's ON for each).
Dan
Post by Deborah
I recently started to use VFP 9.0. On one particular form I am
running, I get output on the screen like "Selected 63 records in 0.01
seconds" followed by a list of the data that was selected. The only
difference between this form and the others I am using is that its
dataenvironment is using two views. I have played around with SET
CONSOLE, but with inconsistent results - sometimes I get the output
to screen, sometimes I don't, and I can't figure out how to stop it!
Can anyone please offer any suggestions or advice on how to stop this
from happening. I have never experienced it before in earlier
versions of VFP - but come to think of it, I never used views before!!
Many thanks - Debbie
Laurentiu
2006-09-14 07:10:22 UTC
Permalink
Post by Debbie
All of my form classes are already coded with SET TALK OFF in the Load
method.
Out of curiosity, I added SET CONSOLE OFF to the DataEnvironment's Load
method and that seemed to fix my problem. But why or how I do not know
because when I test the setting of CONSOLE after the form has loaded it
returns ON!!! Does that make any sense to you?
Post by Dan Freeman
SET TALK OFF in your form's dataenvironment load method. The default is ON
and it's scoped to the Datasession (i.e. it's ON for each).
Dan
Post by Deborah
I recently started to use VFP 9.0. On one particular form I am
running, I get output on the screen like "Selected 63 records in 0.01
seconds" followed by a list of the data that was selected. The only
difference between this form and the others I am using is that its
dataenvironment is using two views. I have played around with SET
CONSOLE, but with inconsistent results - sometimes I get the output
to screen, sometimes I don't, and I can't figure out how to stop it!
Can anyone please offer any suggestions or advice on how to stop this
from happening. I have never experienced it before in earlier
versions of VFP - but come to think of it, I never used views before!!
Many thanks - Debbie
Very interesting, maybe i'm wrong but where's the Load Method in DE ?
I havent' seen it.
And, of course, in the good FOXPRO fashion way, even after placing
SET CONSOLE OFF, SET TALK OFF in Load method of the form, and INIT (or
maybe BeforeOpenTables) the message remains, throwing dirt into the
visual aspect of my application. I hope I will find a solution for one
of these examples of curious ( or bad )
behavior of this language.
AA
2006-09-14 08:21:18 UTC
Permalink
How to do this is shown in the Newid database which is included in the VFP
samples.
-Anders
Post by Laurentiu
Post by Debbie
All of my form classes are already coded with SET TALK OFF in the Load
method.
Out of curiosity, I added SET CONSOLE OFF to the DataEnvironment's Load
method and that seemed to fix my problem. But why or how I do not know
because when I test the setting of CONSOLE after the form has loaded it
returns ON!!! Does that make any sense to you?
Post by Dan Freeman
SET TALK OFF in your form's dataenvironment load method. The default is ON
and it's scoped to the Datasession (i.e. it's ON for each).
Dan
Post by Deborah
I recently started to use VFP 9.0. On one particular form I am
running, I get output on the screen like "Selected 63 records in 0.01
seconds" followed by a list of the data that was selected. The only
difference between this form and the others I am using is that its
dataenvironment is using two views. I have played around with SET
CONSOLE, but with inconsistent results - sometimes I get the output
to screen, sometimes I don't, and I can't figure out how to stop it!
Can anyone please offer any suggestions or advice on how to stop this
from happening. I have never experienced it before in earlier
versions of VFP - but come to think of it, I never used views before!!
Many thanks - Debbie
Very interesting, maybe i'm wrong but where's the Load Method in DE ?
I havent' seen it.
And, of course, in the good FOXPRO fashion way, even after placing
SET CONSOLE OFF, SET TALK OFF in Load method of the form, and INIT (or
maybe BeforeOpenTables) the message remains, throwing dirt into the
visual aspect of my application. I hope I will find a solution for one
of these examples of curious ( or bad )
behavior of this language.
v***@gmail.com
2006-09-19 20:15:10 UTC
Permalink
There is a BeforeOpenTables() method in the Data Environment. The
problem with putting it in the Load of the form is that the data
environment has already opened the views so it won't stop things from
being written to the console.

HTH,
Andrew

Loading...