dbTalk Databases Forums  

Btrieve Triggers

comp.databases.btrieve comp.databases.btrieve


Discuss Btrieve Triggers in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Josh
 
Posts: n/a

Default Btrieve Triggers - 06-06-2005 , 04:56 PM






Hello all -

We're working on an integration project with Timberline where we want
transactions to be "exported" in real-time. Currently, data is exported via
a nightly batch job, but the ultimate goal is to create a
real-time/transactional solution.

Our thought is to create a staging table in Btrieve. Whenever a record on a
specific table in Btrieve is created, a trigger will fire to insert a record
into this staging table. Then we'll have a separate application which
constantly "polls" (ie does selects & deletes) this DB.

Are these triggers feasible in Btrieve? Are there any limitations with any
versions of Btrieve that will prohibit this? Overall, does this solution
sound feasible?

I appreciate any and all advice!

Thanks,

Josh



Reply With Quote
  #2  
Old   
Guy Dawson
 
Posts: n/a

Default Re: Btrieve Triggers - 06-07-2005 , 10:17 AM






Josh wrote:
Quote:
Hello all -

We're working on an integration project with Timberline where we want
transactions to be "exported" in real-time. Currently, data is exported via
a nightly batch job, but the ultimate goal is to create a
real-time/transactional solution.

Our thought is to create a staging table in Btrieve. Whenever a record on a
specific table in Btrieve is created, a trigger will fire to insert a record
into this staging table. Then we'll have a separate application which
constantly "polls" (ie does selects & deletes) this DB.

Are these triggers feasible in Btrieve?
Not at the Btrieve level. If you're accessing the data via Pervasive.SQL
then you can use SQL triggers. These are implemented in the SQL system
which 'sits on top' of the btrieve system. Pervasive SQL triggers can be
used to update a second Pervasive.SQL table when updates occur on another.

It would be feasible for the program reading the staging table to read and
delete at the btrieve level because it does not need triggers. However the
program that puts data in the 'specific table' will have to do so using
Pervasive.SQL if you want triggers to work.

Here's a little hack...

Create the staging table using Pervasive.SQL and create an update trigger.
Define the staging table with an extra status flag.

Insert new records into the staging table using btrieve, set a status flag to 1

At intervals run a Pervasive.SQL update to set the status flag to 0.

The Pervasive.SQL update will fire (pull?) the trigger and copy the data to
the staging table.

Quote:
Are there any limitations with any versions of Btrieve that will prohibit
this?
See above!

Quote:
Overall, does this solution sound feasible?
In Btrieve, no. In Pervasive.SQL, yes.

Quote:
I appreciate any and all advice!
This is USENET... Do you really mean that! :-)

Guy
-- --------------------------------------------------------------------
Guy Dawson I.T. Manager Crossflight Ltd
gnues (AT) crossflight (DOT) co.uk


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.