|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
trigger to another database?
Hi there,
is it possible to create a trigger ala: Code:
CREATE TRIGGER OTHER_DB
FOR ARTIKEL
AFTER UPDATE
AS
DECLARE VARIABLE zahl INTEGER;
BEGIN
SELECT COUNT(*) FROM KUNDEN INTO :zahl;
IF (zahl > 2) THEN
CONNECT 123.456.789.012/3050:/path/to/db;
INSERT INTO ARTIKEL (ZAHLZIEL) VALUES (':zahl')
WHERE KUNDENNR = '19777';
END
I dont know if a trigger is able to "fire" to another db? With this trigger i get always an error like this: Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 1 END Is this possible with triggers? Thanks Lewian |
|
#2
|
|||
|
|||
|
No. (At least not yet
)-- Best regards, Fikret Hasovic http://fikret.fbtalk.net TAMP R&D Team FirebirdSQL Foundation member. - Join today at http://www.firebirdsql.org/ff/foundation JEDI VCS contributor http://jedivcs.sourceforge.net/ |
|
#3
|
|||
|
|||
|
hi fikret,
thanks for our answer. What do you think is the best/easiest way to store the data from a transaction in another remote database? Trigger in a file - file upload per FTP(another way...) - insert into from file? This procedure/file added to a cronjob every minute for example? What do you think is the best replication application? Thanks Andi |
|
#4
|
|||
|
|||
|
Quote:
You can try with FBReplicator (http://www.meta.com.au) It's free and with full source (Delphi). I think that thisi is exactly what yu need. -- Best regards, Fikret Hasovic http://fikret.fbtalk.net TAMP R&D Team FirebirdSQL Foundation member. - Join today at http://www.firebirdsql.org/ff/foundation JEDI VCS contributor http://jedivcs.sourceforge.net/ |
|
#5
|
|||
|
|||
|
Hi fikret,
FBReplicator isnīt unknown to me, but i think there is a problem using it: Iīve a database from a merchandise management programm called GDILine. This database has been created with dialect 1. In this article: Setting Up a Database for Replication i could read, that iīve to change something into "numeric(18,0)". numeric(18,0) is only possible, if the database is created with dialect 3 isnīt it? I changed the dialect of the db with IBConsole, but then the merchandise management isnīt working anymore... Perhaps (hopefully) iīm wrong, but in this case i donīt know what to do more and how Here is a link to the metadata of the database: metadata of GDILine Please have a look on it and tell me that iīm wrong and thatīs possible with FBReplicator Many thanks Andi |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > trigger to another database? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|