Local table buffering and inbreeded procedure issue 
Author Message
 Local table buffering and inbreeded procedure issue

Hello all,

I need to ensure local tables have their record buffering set to ensure an
update trigger occurs.  As update trigger procedure compares OLDVAL() to the
CURVAL().  Now being tables on a local drive they always open with a
Buffering value of 1 or turned off.  Because I always want this property set
to another value the following line was placed within the DBC imbedded
procedure.

= CursorSetProp("Buffering",3,"ThisTable")

The problem is when are imbedded procedures read.  Are they read as the
result of trigger calls or can an DBC imbedded procedure be set to run
whenever the database is opened?

Thanks in advance.



Tue, 20 May 2003 03:00:00 GMT  
 Local table buffering and inbreeded procedure issue
Hi Guy,

Normally this is done at the Form level, either in the Data Environment or
the Load() of the Form.

Best regards,
Tom


Quote:
> Hello all,

> I need to ensure local tables have their record buffering set to ensure an
> update trigger occurs.  As update trigger procedure compares OLDVAL() to
the
> CURVAL().  Now being tables on a local drive they always open with a
> Buffering value of 1 or turned off.  Because I always want this property
set
> to another value the following line was placed within the DBC imbedded
> procedure.

> = CursorSetProp("Buffering",3,"ThisTable")

> The problem is when are imbedded procedures read.  Are they read as the
> result of trigger calls or can an DBC imbedded procedure be set to run
> whenever the database is opened?

> Thanks in advance.



Tue, 20 May 2003 03:00:00 GMT  
 Local table buffering and inbreeded procedure issue
If you want ALL tables to have buffering, try:

 = CursorSetProp("Buffering",3,0)

--
Fred
Microsoft Visual FoxPro MVP


Quote:
> Hello all,

> I need to ensure local tables have their record buffering set to ensure an
> update trigger occurs.  As update trigger procedure compares OLDVAL() to
the
> CURVAL().  Now being tables on a local drive they always open with a
> Buffering value of 1 or turned off.  Because I always want this property
set
> to another value the following line was placed within the DBC imbedded
> procedure.

> = CursorSetProp("Buffering",3,"ThisTable")

> The problem is when are imbedded procedures read.  Are they read as the
> result of trigger calls or can an DBC imbedded procedure be set to run
> whenever the database is opened?

> Thanks in advance.



Tue, 20 May 2003 03:00:00 GMT  
 Local table buffering and inbreeded procedure issue
Thanks for your response but I afraid it missed the point.

Hi Tom and Fred

Thanks for your response, but perhaps I didn1t convey the point correctly or
very well.  Yes I am aware as you point out that you can alter table
buffering within an open database container with

= CursorSetProp("Buffering",3,"ThisTable")

Sorry I thought I had stated that this was how it was done initially.  
However no one addressed the specifics of the issue.

I would like to avoid using calls to an external procedure to set the
environment first. I would like to set this procedure to that it runs each
time database container1s be is opened.  Even if a user opens it with a
simple use then browse command.

This is due to the fact that I always want the table to execute its Update
trigger which would not happen when table buffering is off or Multilinks is
set to off. I would like the database container to control the table1s
environment including its data buffering which in my humble opinion it should
be able to do even when it on a local drive.

So can someone advise me if this can be done and how?

Guy

On Fri, 1 Dec 2000 21:45:56 -0500, Fred Taylor wrote

Quote:
> If you want ALL tables to have buffering, try:

>  = CursorSetProp("Buffering",3,0)

> --
> Fred
> Microsoft Visual FoxPro MVP



>> Hello all,

>> I need to ensure local tables have their record buffering set to ensure an
>> update trigger occurs.  As update trigger procedure compares OLDVAL() to
> the
>> CURVAL().  Now being tables on a local drive they always open with a
>> Buffering value of 1 or turned off.  Because I always want this property
> set
>> to another value the following line was placed within the DBC imbedded
>> procedure.

>> = CursorSetProp("Buffering",3,"ThisTable")

>> The problem is when are imbedded procedures read.  Are they read as the
>> result of trigger calls or can an DBC imbedded procedure be set to run
>> whenever the database is opened?

>> Thanks in advance.



Wed, 21 May 2003 03:00:00 GMT  
 Local table buffering and inbreeded procedure issue
Guy,

(1) Instead of CURVAL('field') simply use field
(2) It is true that oldval requires table buffering of some kind UNLESS it
is used within a trigger.
 look in the help, 2nd par under REMARKS for OLDVAL
-------------

| Thanks for your response but I afraid it missed the point.
|
| Hi Tom and Fred
|
| Thanks for your response, but perhaps I didn1t convey the point correctly
or
| very well.  Yes I am aware as you point out that you can alter table
| buffering within an open database container with
|
| = CursorSetProp("Buffering",3,"ThisTable")
|
| Sorry I thought I had stated that this was how it was done initially.
| However no one addressed the specifics of the issue.
|
| I would like to avoid using calls to an external procedure to set the
| environment first. I would like to set this procedure to that it runs each
| time database container1s be is opened.  Even if a user opens it with a
| simple use then browse command.
|
| This is due to the fact that I always want the table to execute its Update
| trigger which would not happen when table buffering is off or Multilinks
is
| set to off. I would like the database container to control the table1s
| environment including its data buffering which in my humble opinion it
should
| be able to do even when it on a local drive.
|
| So can someone advise me if this can be done and how?
|
| Guy
|
|
| On Fri, 1 Dec 2000 21:45:56 -0500, Fred Taylor wrote

|
| > If you want ALL tables to have buffering, try:
| >
| >  = CursorSetProp("Buffering",3,0)
| >
| >
| > --
| > Fred
| > Microsoft Visual FoxPro MVP
| >


| >> Hello all,
| >>
| >> I need to ensure local tables have their record buffering set to ensure
an
| >> update trigger occurs.  As update trigger procedure compares OLDVAL()
to
| > the
| >> CURVAL().  Now being tables on a local drive they always open with a
| >> Buffering value of 1 or turned off.  Because I always want this
property
| > set
| >> to another value the following line was placed within the DBC imbedded
| >> procedure.
| >>
| >> = CursorSetProp("Buffering",3,"ThisTable")
| >>
| >> The problem is when are imbedded procedures read.  Are they read as the
| >> result of trigger calls or can an DBC imbedded procedure be set to run
| >> whenever the database is opened?
| >>
| >> Thanks in advance.
| >>
| >
| >
|
|



Wed, 21 May 2003 03:00:00 GMT  
 Local table buffering and inbreeded procedure issue
I didn't make myself real clear here.  You do the
CURSORSETPROP("Buffering",3,0) before you actually open any tables.  Once
you've issued this command, all future tables that you open will
automatically use "record buffering".

--
Fred
Microsoft Visual FoxPro MVP


Quote:
> Thanks for your response but I afraid it missed the point.

> Hi Tom and Fred

> Thanks for your response, but perhaps I didn1t convey the point correctly
or
> very well.  Yes I am aware as you point out that you can alter table
> buffering within an open database container with

> = CursorSetProp("Buffering",3,"ThisTable")

> Sorry I thought I had stated that this was how it was done initially.
> However no one addressed the specifics of the issue.

> I would like to avoid using calls to an external procedure to set the
> environment first. I would like to set this procedure to that it runs each
> time database container1s be is opened.  Even if a user opens it with a
> simple use then browse command.

> This is due to the fact that I always want the table to execute its Update
> trigger which would not happen when table buffering is off or Multilinks
is
> set to off. I would like the database container to control the table1s
> environment including its data buffering which in my humble opinion it
should
> be able to do even when it on a local drive.

> So can someone advise me if this can be done and how?

> Guy

> On Fri, 1 Dec 2000 21:45:56 -0500, Fred Taylor wrote

> > If you want ALL tables to have buffering, try:

> >  = CursorSetProp("Buffering",3,0)

> > --
> > Fred
> > Microsoft Visual FoxPro MVP



> >> Hello all,

> >> I need to ensure local tables have their record buffering set to ensure
an
> >> update trigger occurs.  As update trigger procedure compares OLDVAL()
to
> > the
> >> CURVAL().  Now being tables on a local drive they always open with a
> >> Buffering value of 1 or turned off.  Because I always want this
property
> > set
> >> to another value the following line was placed within the DBC imbedded
> >> procedure.

> >> = CursorSetProp("Buffering",3,"ThisTable")

> >> The problem is when are imbedded procedures read.  Are they read as the
> >> result of trigger calls or can an DBC imbedded procedure be set to run
> >> whenever the database is opened?

> >> Thanks in advance.



Wed, 21 May 2003 03:00:00 GMT  
 Local table buffering and inbreeded procedure issue
I didn't make myself real clear here.  You do the
CURSORSETPROP("Buffering",3,0) before you actually open any tables.  Once
you've issued this command, all future tables that you open will
automatically use "record buffering".

--
Fred
Microsoft Visual FoxPro MVP


Quote:
> Thanks for your response but I afraid it missed the point.

> Hi Tom and Fred

> Thanks for your response, but perhaps I didn1t convey the point correctly
or
> very well.  Yes I am aware as you point out that you can alter table
> buffering within an open database container with

> = CursorSetProp("Buffering",3,"ThisTable")

> Sorry I thought I had stated that this was how it was done initially.
> However no one addressed the specifics of the issue.

> I would like to avoid using calls to an external procedure to set the
> environment first. I would like to set this procedure to that it runs each
> time database container1s be is opened.  Even if a user opens it with a
> simple use then browse command.

> This is due to the fact that I always want the table to execute its Update
> trigger which would not happen when table buffering is off or Multilinks
is
> set to off. I would like the database container to control the table1s
> environment including its data buffering which in my humble opinion it
should
> be able to do even when it on a local drive.

> So can someone advise me if this can be done and how?

> Guy

> On Fri, 1 Dec 2000 21:45:56 -0500, Fred Taylor wrote

> > If you want ALL tables to have buffering, try:

> >  = CursorSetProp("Buffering",3,0)

> > --
> > Fred
> > Microsoft Visual FoxPro MVP



> >> Hello all,

> >> I need to ensure local tables have their record buffering set to ensure
an
> >> update trigger occurs.  As update trigger procedure compares OLDVAL()
to
> > the
> >> CURVAL().  Now being tables on a local drive they always open with a
> >> Buffering value of 1 or turned off.  Because I always want this
property
> > set
> >> to another value the following line was placed within the DBC imbedded
> >> procedure.

> >> = CursorSetProp("Buffering",3,"ThisTable")

> >> The problem is when are imbedded procedures read.  Are they read as the
> >> result of trigger calls or can an DBC imbedded procedure be set to run
> >> whenever the database is opened?

> >> Thanks in advance.



Wed, 21 May 2003 03:00:00 GMT  
 Local table buffering and inbreeded procedure issue
Guy,

You will be interested to know that there will be support for database
events in VFP7 so you can have code that runs when the database is activated
("When the DBC is made current via SET DATABASE TO <dbname> or after OPEN
DATABASE completes.")

There are about 56 separate database events you can code for.

--

Cindy Winegarden

Microsoft Certified Professional, Visual FoxPro
Microsoft Visual FoxPro MVP



| Thanks for your response but I afraid it missed the point.
|
| Hi Tom and Fred
|
| Thanks for your response, but perhaps I didn1t convey the point correctly
or
| very well.  Yes I am aware as you point out that you can alter table
| buffering within an open database container with
|
| = CursorSetProp("Buffering",3,"ThisTable")
|
| Sorry I thought I had stated that this was how it was done initially.
| However no one addressed the specifics of the issue.
|
| I would like to avoid using calls to an external procedure to set the
| environment first. I would like to set this procedure to that it runs each
| time database container1s be is opened.  Even if a user opens it with a
| simple use then browse command.
|
| This is due to the fact that I always want the table to execute its Update
| trigger which would not happen when table buffering is off or Multilinks
is
| set to off. I would like the database container to control the table1s
| environment including its data buffering which in my humble opinion it
should
| be able to do even when it on a local drive.
|
| So can someone advise me if this can be done and how?
|
| Guy
|
|
| On Fri, 1 Dec 2000 21:45:56 -0500, Fred Taylor wrote

|
| > If you want ALL tables to have buffering, try:
| >
| >  = CursorSetProp("Buffering",3,0)
| >
| >
| > --
| > Fred
| > Microsoft Visual FoxPro MVP
| >


| >> Hello all,
| >>
| >> I need to ensure local tables have their record buffering set to ensure
an
| >> update trigger occurs.  As update trigger procedure compares OLDVAL()
to
| > the
| >> CURVAL().  Now being tables on a local drive they always open with a
| >> Buffering value of 1 or turned off.  Because I always want this
property
| > set
| >> to another value the following line was placed within the DBC imbedded
| >> procedure.
| >>
| >> = CursorSetProp("Buffering",3,"ThisTable")
| >>
| >> The problem is when are imbedded procedures read.  Are they read as the
| >> result of trigger calls or can an DBC imbedded procedure be set to run
| >> whenever the database is opened?
| >>
| >> Thanks in advance.
| >>
| >
| >
|
|



Thu, 22 May 2003 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. - How to SELECT from table buffered view without issuing TABLEUPDATE

2. Slowdown issues with Optimistic Table Buffering?

3. Help with updating local tables from local views!

4. Update SQL On Buffer Mode Override = Optimistic Table Buffering

5. Table Buffering Problem (using level 5 buffering)

6. Local view and buffering

7. Multiuser and Data Buffering Issues

8. Foxpro Locking, Buffering, Replacing Issue

9. Stored Procedures Issue

10. Table corruption - Buffered tables / Transactions HELP

11. Problem with network tables linked to local database

12. VFP 6-Local view not updating table

 

 
Powered by phpBB® Forum Software