Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 23rd, 2004, 04:58 PM
lewian lewian is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Germany, Berlin
Posts: 6 lewian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 3 sec
Reputation Power: 0
Send a message via ICQ to lewian
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

Reply With Quote
  #2  
Old September 24th, 2004, 04:31 AM
fikret fikret is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Sarajevo, Bosnia
Posts: 111 fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 5 h 32 m 11 sec
Reputation Power: 8
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/

Reply With Quote
  #3  
Old September 27th, 2004, 02:02 AM
lewian lewian is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Germany, Berlin
Posts: 6 lewian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 3 sec
Reputation Power: 0
Send a message via ICQ to lewian
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

Reply With Quote
  #4  
Old September 27th, 2004, 02:51 AM
fikret fikret is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Sarajevo, Bosnia
Posts: 111 fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 5 h 32 m 11 sec
Reputation Power: 8
Quote:
Originally Posted by lewian

What do you think is the best replication application?

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/

Reply With Quote
  #5  
Old September 27th, 2004, 04:05 AM
lewian lewian is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Germany, Berlin
Posts: 6 lewian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 3 sec
Reputation Power: 0
Send a message via ICQ to lewian
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > trigger to another database?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT