Q: Cursor's Exclusive property in a form's datasession 
Author Message
 Q: Cursor's Exclusive property in a form's datasession

In a form's datasession, I've added a local view 'aoulog' and set the
following properties during the form design (i.e. interactively):

DataEnvironment.BeforeOpenTables
    set exclusive off
    set deleted on

DataEnvironment.InitialSelectedAlias=aoulog
DataEnvironment.Cursor1.Buffermodeoverride=3

Form.DataSession=2

Indexing of the local view is done in Form.Init

I find that I cannot change the Exclusive property of cursor1 (aoulog) in
the dataenvironment to .F.

When I run the form, if I've not made any changes then it's OK. However,
once a change to the value of a field has been made without saving, when the
form is released, an error message pops up 'alias aoulog is not found'.

I wonder what i've done wrong.

Please advise and thanks in advance.

Stephen Wat



Fri, 28 Jul 2000 03:00:00 GMT  
 Q: Cursor's Exclusive property in a form's datasession

First of all, is your form using the default datasession (not private)?
Then, if the table is already opened as exclusive, you have to close it and
reopen it before it can be set as exclusive off.  Also, I don't know about
5.0 but in 3 I know that there was something about if a table was open in
one area with exclusive on, and you reopened it AGAIN, in another area, it
would, by default, open with the other's settings.  Does that make sense?
Maybe that's happening?  If I've missed the mark please post some more info
about your data sessions.  Also, FWIW, the MS help suggests strongly not
mucking about with setting datasessions...
--

Nancy Folsom
(abqnfatdamescom--replace the word at and put a dot before the com)



Quote:
> In a form's datasession, I've added a local view 'aoulog' and set the
> following properties during the form design (i.e. interactively):

> DataEnvironment.BeforeOpenTables
>     set exclusive off
>     set deleted on

> DataEnvironment.InitialSelectedAlias=aoulog
> DataEnvironment.Cursor1.Buffermodeoverride=3

> Form.DataSession=2

> Indexing of the local view is done in Form.Init

> I find that I cannot change the Exclusive property of cursor1 (aoulog) in
> the dataenvironment to .F.

...snip


Fri, 28 Jul 2000 03:00:00 GMT  
 Q: Cursor's Exclusive property in a form's datasession

Nancy,

Perhaps I should re-organise my question. Since i posted my message here, I
have experimented a bit and found something which i don't know if it's
normal:

To recap:

In the form designer, i did the following:
(1) in the dataenvironment of the form (not datasession, sorry i mixed them
up), I added a local view 'aoulog'.

(2) the following properties were set in the Form Designer as well

DataEnvironment.BeforeOpenTables
     set exclusive off
     set deleted on

DataEnvironment.InitialSelectedAlias=aoulog
DataEnvironment.Cursor1.Buffermodeoverride=3

Form.DataSession=2 (i.e. private datasession)

Indexing of the local view is done in Form.Init
--------
Now, if i run several instances of the form, i found that in the vfp
datasession window,  for each form's datasession
(a) the view 'aoulog' is used exclusively
(a) the parent table 'oulogvfp' for the view is shared with optimistic row
buffering enabled.

Q1: So, i suppose in this case even if the view is opened exlcusive in this
form's datasession, no single user of this form can lock up the view and
block access by others on a network. Am i correct?

Q2: What puzzles me is according to vfp help, when a view is added to the
DE of a form, i should be able to set the dataenvironment.cursor.exclusive
property to .T. or .F. but it is not the case, the default setting is
simply .T. in italics. i wonder if this is normal?
---------
Now, when i run the same form in my app, if i made some changes to the
values of the fields but do not save them, an error 'alias 'aoulog' is not
found' is reported when the form is released and the program halts on the
Read Events line. If i do not make any changes, then the form is released
without this error.

Q3: Any idea why this error occurs?
----------
Q4: what i also want to know is, i prefer to use the local views as defined
in my database and just add them to my form. From what i've described
above, am i setting the right properties (for multiuser access) and is it
right to index on the view in the forms init event?

Sorry for such a long message, but as a novice, I get quite confused on
what i've encountered so far.

Thanks in advance

Stephen Wat



Fri, 28 Jul 2000 03:00:00 GMT  
 Q: Cursor's Exclusive property in a form's datasession

Nancy,

Perhaps I should re-organise my question. Since i posted my message here, I
have experimented a bit and found something which i don't know if it's
normal:

To recap:

In the form designer, i did the following:
(1) in the dataenvironment of the form (not datasession, sorry i mixed them
up), I added a local view 'aoulog'.

(2) the following properties were set in the Form Designer as well

DataEnvironment.BeforeOpenTables
     set exclusive off
     set deleted on

DataEnvironment.InitialSelectedAlias=aoulog
DataEnvironment.Cursor1.Buffermodeoverride=3

Form.DataSession=2 (i.e. private datasession)

Indexing of the local view is done in Form.Init
--------
Now, if i run several instances of the form, i found that in the vfp
datasession window,  for each form's datasession
(a) the view 'aoulog' is used exclusively
(a) the parent table 'oulogvfp' for the view is shared with optimistic row
buffering enabled.

Q1: So, i suppose in this case even if the view is opened exlcusive in this
form's datasession, no single user of this form can lock up the view and
block access by others on a network. Am i correct?

Q2: What puzzles me is according to vfp help, when a view is added to the
DE of a form, i should be able to set the dataenvironment.cursor.exclusive
property to .T. or .F. but it is not the case, the default setting is
simply .T. in italics. i wonder if this is normal?
---------
Now, when i run the same form in my app, if i made some changes to the
values of the fields but do not save them, an error 'alias 'aoulog' is not
found' is reported when the form is released and the program halts on the
Read Events line. If i do not make any changes, then the form is released
without this error.

Q3: Any idea why this error occurs?
----------
Q4: what i also want to know is, i prefer to use the local views as defined
in my database and just add them to my form. From what i've described
above, am i setting the right properties (for multiuser access) and is it
right to index on the view in the forms init event?

Sorry for such a long message, but as a novice, I get quite confused on
what i've encountered so far.

Thanks in advance

Stephen Wat



Fri, 28 Jul 2000 03:00:00 GMT  
 Q: Cursor's Exclusive property in a form's datasession

Hi, Stephen.  

Thanks for the really good description.  I'm just getting starting to
switch from using tables to views.  I made up a temp form and found the
same behavior as you when I added a view.  I know that views aren't
updateable by default...whether or not this has anything to do what you
need--I don't know.  I hope that someone else will jump with their
expertise, but meanwhile, I'll spend some time on it, too, because I have
to understand also.  

Sorry, this isn't any help, but thanks for the question, anyway!

--

Nancy Folsom
(abqnfatdamescom--replace the word at and put a dot before the com)



Quote:
> Nancy,

> Perhaps I should re-organise my question. Since i posted my message here,
I
> have experimented a bit and found something which i don't know if it's
> normal:

> To recap:

> In the form designer, i did the following:
> (1) in the dataenvironment of the form (not datasession, sorry i mixed
them
> up), I added a local view 'aoulog'.

> (2) the following properties were set in the Form Designer as well

> DataEnvironment.BeforeOpenTables
>      set exclusive off
>      set deleted on

> DataEnvironment.InitialSelectedAlias=aoulog
> DataEnvironment.Cursor1.Buffermodeoverride=3

> Form.DataSession=2 (i.e. private datasession)

> Indexing of the local view is done in Form.Init
> --------
> Now, if i run several instances of the form, i found that in the vfp
> datasession window,  for each form's datasession
> (a) the view 'aoulog' is used exclusively
> (a) the parent table 'oulogvfp' for the view is shared with optimistic
row
> buffering enabled.

> Q1: So, i suppose in this case even if the view is opened exlcusive in
this
> form's datasession, no single user of this form can lock up the view and
> block access by others on a network. Am i correct?

> Q2: What puzzles me is according to vfp help, when a view is added to the
> DE of a form, i should be able to set the

dataenvironment.cursor.exclusive

- Show quoted text -

Quote:
> property to .T. or .F. but it is not the case, the default setting is
> simply .T. in italics. i wonder if this is normal?
> ---------
> Now, when i run the same form in my app, if i made some changes to the
> values of the fields but do not save them, an error 'alias 'aoulog' is
not
> found' is reported when the form is released and the program halts on the
> Read Events line. If i do not make any changes, then the form is released
> without this error.

> Q3: Any idea why this error occurs?
> ----------
> Q4: what i also want to know is, i prefer to use the local views as
defined
> in my database and just add them to my form. From what i've described
> above, am i setting the right properties (for multiuser access) and is it
> right to index on the view in the forms init event?

> Sorry for such a long message, but as a novice, I get quite confused on
> what i've encountered so far.

> Thanks in advance

> Stephen Wat



Sat, 29 Jul 2000 03:00:00 GMT  
 Q: Cursor's Exclusive property in a form's datasession

Nancy,

Perhaps I should re-organise my question. Since i posted my message here, I
have experimented a bit and found something which i don't know if it's
normal:

To recap:

In the form designer, i did the following:
(1) in the dataenvironment of the form (not datasession, sorry i mixed them
up), I added a local view 'aoulog'.

(2) the following properties were set in the Form Designer as well

DataEnvironment.BeforeOpenTables
     set exclusive off
     set deleted on

 DataEnvironment.InitialSelectedAlias=aoulog
 DataEnvironment.Cursor1.Buffermodeoverride=3

 Form.DataSession=2 (i.e. private datasession)

Indexing of the local view is done in Form.Init
--------
Now, if i run several instances of the form, i found that in the vfp
datasession window,  for each form's datasession
(a) the view 'aoulog' is used exclusively
(b) the parent table 'oulogvfp' for the view is shared with optimistic row
 buffering enabled.

Q1: So, i suppose in this case even if the view is opened exlcusive in this
form's datasession, no single user of this form can lock up the view and
block access by others on a network. Am i correct?

Q2: What puzzles me is according to vfp help, when a view is added to the
DE of a form, i should be able to set the dataenvironment.cursor.exclusive
property to .T. or .F. but it is not the case, the default setting is
simply .T. in italics. i wonder if this is normal?
---------
Now, when i run the same form in my app, if i made some changes to the
values of the fields but do not save them, an error 'alias 'aoulog' is not
found' is reported when the form is released and the program halts on the
Read Events line. If i do not make any changes, then the form is released
without this error.

Q3: Any idea why this error occurs?
----------
Q4: what i also want to know is, i prefer to use the local views as defined
in my database and just add them to my form. From what i've described
above, am i setting the right properties (for multiuser access) and is it
right to index on the view in the forms init event?

Sorry for such a long message, but as a novice, I get quite confused on
what i've encountered so far.

Thanks in advance

Stephen Wat



Sat, 29 Jul 2000 03:00:00 GMT  
 Q: Cursor's Exclusive property in a form's datasession

I've been having some trouble with downloading from and posting to here, so
I've ended up sending up my message a few times.

Sorry about that!

Stephen Wat
(live long and prosper)



Sun, 30 Jul 2000 03:00:00 GMT  
 Q: Cursor's Exclusive property in a form's datasession

Quote:
>I find that I cannot change the Exclusive property of cursor1 (aoulog) in
>the dataenvironment to .F.

Perhaps I am misunderstanding your question, but what makes you think that
you can Share a view the same way you share a table?

It seems to me that a view is by its nature Exclusive.  This doesn't mean
that other people or other data sessions can't also open their own copies of
this view.

However, you seem to be under the impression that your problem is the order
in which you are trying to do things.  I don't think this has anything to do
with your form or your data environment...

Try the following in the command window:

 set exclus off
 use
 use view1 shared
 set status bar on

... notice that the view is still Exclusive...

What you need to do is make sure that the *tables* underneath the views are
not opened Exclusive, if and when they need to be opened, but that doesn't
have anything to do with *views*.

Or so I grok...

Quote:
>L<



Mon, 14 Aug 2000 03:00:00 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. List boxes in VFP 6.0 - selected property won't set in form's init

2. Database Views are opened exclusive in a form's data environment

3. Changing one form's properties from a different form

4. setting form's datasession to private cause slow query data

5. Top Level Form, Menus and Form's Properties

6. Can't reference on forms properties from another form

7. Urgent qs for guru's:Record is not locked

8. 'create cursor' creates problem

9. 'CREATE'-ing a public cursor

10. RUNTIME ERROR 'Cannot update Cursor'?????

11. - changing form object properties with refresh method - beginner's question

12. form's property ?

 

 
Powered by phpBB® Forum Software