I have a strange problem here: In my app (VFP 7), I have a bunch of tables
opened. Let's say Table1 is opened in area 1 as alias Table1, and Table2 is
opened in area 2 as alias Table2, from DatabaseABC. I have Form1 in which
Table1 is the source of data. In Form1, I click on one of the listed items
and this opens Form2 with the details coming from Table2. To show data from
Table2, I do a SELECT TABLE2. The data is not showing properly. I kept the
Data Session window opened to see what is happening and after I issue SELECT
TABLE2, the alias TABLE1 is still highlighted as selected. How could this
be??? (To go over this, I issue a BROWSE, and only then TABLE2 is selected...
stranger, no?)
Please help... I'm supposed to ship this app to my client this weekend!

Pat

Re: Select Alias vs Data Session by Mark

Mark
Tue May 10 19:58:12 CDT 2005

First, is your form using a Private data session (see DataSession property
for the form). If it is, you need to look at the proper Data Session to
observe what is really happening with the SELECTion of your tables. You may
have Table1 and Table2 open in the default session, but they would also be
reopened in the private data session of the form. When you run the form,
open the Data Session window (option found under the Window menu pad) and
change the Current Session to that of your form.

"Pat" <Pat@discussions.microsoft.com> wrote in message
news:BF5F8507-4A94-43CF-940D-FF8EC2EE8B25@microsoft.com...
> I have a strange problem here: In my app (VFP 7), I have a bunch of tables
> opened. Let's say Table1 is opened in area 1 as alias Table1, and Table2
is
> opened in area 2 as alias Table2, from DatabaseABC. I have Form1 in which
> Table1 is the source of data. In Form1, I click on one of the listed items
> and this opens Form2 with the details coming from Table2. To show data
from
> Table2, I do a SELECT TABLE2. The data is not showing properly. I kept the
> Data Session window opened to see what is happening and after I issue
SELECT
> TABLE2, the alias TABLE1 is still highlighted as selected. How could this
> be??? (To go over this, I issue a BROWSE, and only then TABLE2 is
selected...
> stranger, no?)
> Please help... I'm supposed to ship this app to my client this weekend!
>
> Pat



Re: Select Alias vs Data Session by Ben

Ben
Wed May 11 13:16:35 CDT 2005

Hi,

Forget about using a private data session. You better control the data
yourself (programmatically) so you know what's going on at every time.

Private Data Sessions are acting very weird sometimes.


Ben


Re: Select Alias vs Data Session by Mark

Mark
Wed May 11 20:45:35 CDT 2005

I have used them since I started using VFP (version 5) and have never had a
problem with them.

"Ben" <ben.peeters@telogy.be> wrote in message
news:1115835395.837428.86000@g49g2000cwa.googlegroups.com...
> Hi,
>
> Forget about using a private data session. You better control the data
> yourself (programmatically) so you know what's going on at every time.
>
> Private Data Sessions are acting very weird sometimes.
>
>
> Ben
>



Re: Select Alias vs Data Session by Fred

Fred
Wed May 11 20:43:06 CDT 2005

I've never noticed anything weird in using Private Data sessions, unless you
are changing the active one in code and not putting things back where you
found them before you return from the routine that changed it.

--
Fred
Microsoft Visual FoxPro MVP


"Ben" <ben.peeters@telogy.be> wrote in message
news:1115835395.837428.86000@g49g2000cwa.googlegroups.com...
> Hi,
>
> Forget about using a private data session. You better control the data
> yourself (programmatically) so you know what's going on at every time.
>
> Private Data Sessions are acting very weird sometimes.
>
>
> Ben
>



Re: Select Alias vs Data Session by Dan

Dan
Thu May 12 10:18:17 CDT 2005

Like Mark and Fred, I've never had a problem with private data sessions and
I've been using them since the first Alpha release of VFP3.

Dan

Ben wrote:
> Hi,
>
> Forget about using a private data session. You better control the data
> yourself (programmatically) so you know what's going on at every time.
>
> Private Data Sessions are acting very weird sometimes.
>
>
> Ben



Re: Select Alias vs Data Session by Pat

Pat
Thu May 12 12:16:05 CDT 2005

Thanks to all but I have no private data session (funny how one reply can
generate a bunch of comments!)

I have DATA ENVIRONMENT set up in that screen Could it be a clue?

I am still questionning why a simple BROWSE can indeed resolve this issue...
Is there another command I can use which would be transparent to the user? I
am currently using BROWSE TIMEOUT 1 but the user have to wait for it to
disappear before she sees the proper screen with data.

"Dan Freeman" wrote:

> Like Mark and Fred, I've never had a problem with private data sessions and
> I've been using them since the first Alpha release of VFP3.
>
> Dan
>
> Ben wrote:
> > Hi,
> >
> > Forget about using a private data session. You better control the data
> > yourself (programmatically) so you know what's going on at every time.
> >
> > Private Data Sessions are acting very weird sometimes.
> >
> >
> > Ben
>
>
>

Re: Select Alias vs Data Session by Mark

Mark
Fri May 13 16:21:02 CDT 2005

So for that form, the DataSession property is set to 1 (Default), correct?
In the properties of your dataEnvironment, do you have TABLE1 set as the
InitialSelectedAlias? When the form opens, your DE will SELECT this table if
it has a table alias for a value. As for where you are issuing the SELECT
TABLE2 command, are you doing this in a form method? If so, which method?
You should be doing this in a form method like LOAD or INIT and not
necessarily in on of the methods of the form's DataEnvironment.

Finally, could you explaing why the SELECTion of a particular table for the
form is a problem? Do you have a grid on the form where you are trying to
display the data from this table? If so, make sure the RecordSource for that
grid is set to the proper table alias/name. Then it won't matter if the
correct table is SELECTed.

"Pat" <Pat@discussions.microsoft.com> wrote in message
news:96100142-2738-4FC0-807A-36EDED681573@microsoft.com...
> Thanks to all but I have no private data session (funny how one reply can
> generate a bunch of comments!)
>
> I have DATA ENVIRONMENT set up in that screen Could it be a clue?
>
> I am still questionning why a simple BROWSE can indeed resolve this
issue...
> Is there another command I can use which would be transparent to the user?
I
> am currently using BROWSE TIMEOUT 1 but the user have to wait for it to
> disappear before she sees the proper screen with data.
>
> "Dan Freeman" wrote:
>
> > Like Mark and Fred, I've never had a problem with private data sessions
and
> > I've been using them since the first Alpha release of VFP3.
> >
> > Dan
> >
> > Ben wrote:
> > > Hi,
> > >
> > > Forget about using a private data session. You better control the data
> > > yourself (programmatically) so you know what's going on at every time.
> > >
> > > Private Data Sessions are acting very weird sometimes.
> > >
> > >
> > > Ben
> >
> >
> >