In our application we have two databases. For the sake of anonymity I'll call them Database A and Database B.
Database A is our main, bread-and-butter database. It is where all the live, working data resides. Database B is a history database. After a period of time, certain records get archived from A to B. B also contains sales history. And the primary data with which this question concerns itself is audit data. When a typical R:Base 6.5++ user enters our application we CONNECT to Database A and then SCONNECT database B via a system DSN with the R:Base ODBC driver. Whenever certain tables in Database A are updated or receive inserts, triggers fire off to post an audit record into a table in Database B. This much works fine. Now the interesting part. We have an external program running on a server that interfaces with a network of RF scanners. Currently that program reads files that we have written to disk for validating input data and writes transactions to a file on disk. We then have a program that posts the transactions and rewrites the validation files. We wish to have this external program altered to use ODBC instead of files on disk for the validations and transactions. We would use Oterro as the driver. Here's the rub: the external program would connect to Database A with the Oterro driver. It would look at views in Database A for validations. It would create a transaction by inserting a record into a table in Database A. There would be a trigger on the transaction table that would perform the necessary processing and post the transaction as appropriate. However, as soon as that trigger updates an inventory table, a trigger on the inventory table will fire off that needs to write an audit transaction into Database B. The external program would not know anything about Database B or the audit triggers. It is a commercial product, not a piece of custom software. Now, the question: In this case how can we establish a connection between the Oterro driver (which is processing the first trigger caused by the insert to the transaction table in Database A) and Database B so that the second trigger (caused by the first trigger's update of an inventory table in Database A) can write the audit record into Database B? Thank you for your thoughts ... Emmitt Dove Manager, DairyPak Business Systems Blue Ridge Paper Products, Inc. 40 Lindeman Drive Trumbull, CT 06611 (203) 673-2231 [EMAIL PROTECTED] [EMAIL PROTECTED] ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
