#1  
Old 10th July 2009, 10:32 PM
Tyrone Nason
 
Posts: n/a
Default New to Triggers...

Hi all,

I am investigating triggers. I have written a simple trigger to complete
fields once a new row has been inserted. I have created and tested with EM.
When an "insert" occurs on table, trigger executes and desired result is all
OK with EM (trigger fields are completed).

But now I try with D7, Nexus 2.061 ( I know old), embedded server... when I
insert record via SQL insert, trigger doesn't execute ?

Q1: Is there any simple trigger example or sample ?
Q2: Can you have triggers with embedded server ?
Q3: What components are required (nxSqlTriggerMonitor, nxSqlEngine1 etc) ?

Thanks,

Tyrone



__________ Information from ESET Smart Security, version of virus signature database 4188 (20090625) __________

The message was checked by ESET Smart Security.

http://www.eset.com




  #2  
Old 11th July 2009, 09:52 AM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: New to Triggers...

> Q1: Is there any simple trigger example or sample ?

I'm afraid not yet.

> Q2: Can you have triggers with embedded server ?


Yes.

> Q3: What components are required (nxSqlTriggerMonitor, nxSqlEngine1
> etc) ?


Exactly. Hook together via properties and activate, and triggers should
work.



--
Eivind Bakkestuen [NDD]
Nexus Database Systems
  #3  
Old 28th July 2009, 08:35 AM
Hannes Danzl[NDD]
 
Posts: n/a
Default Re: New to Triggers...

Eivind Bakkestuen [NDD] wrote:

> > Q1: Is there any simple trigger example or sample ?

>
> I'm afraid not yet.
>
> > Q2: Can you have triggers with embedded server ?

>
> Yes.


Make sure to have teh trigger monitor added to the server and active. Check
out the Server tutorial how to do create a "server" that supports SQL and
triggers:
http://www.nexusdb.com/support/index.php?q=node/607
  #4  
Old 28th July 2009, 09:18 AM
Ad Franse
 
Posts: n/a
Default Re: New to Triggers...

Hannes Danzl[NDD] schreef:

> Make sure to have teh trigger monitor added to the server and active. Check
> out the Server tutorial how to do create a "server" that supports SQL and
> triggers:
> http://www.nexusdb.com/support/index.php?q=node/607


Very nice presentation !
congratulations.

Ad Franse
  #5  
Old 28th July 2009, 11:30 PM
Diniz
 
Posts: n/a
Default Re: New to Triggers...

Hannes

> http://www.nexusdb.com/support/index.php?q=node/607


YES, it is a very nice presentation !

BUT...

After that...how can I load/save NXServer configuration (ALIAS and
Directories, etc.) ?

Thanks

Diniz
Brazil


  #6  
Old 29th July 2009, 01:49 AM
Franz-Leo Chomse [NDX]
 
Posts: n/a
Default Re: New to Triggers...

On Tue, 28 Jul 2009 09:30:45 -0300, "Diniz" <deltress@deltress.com.br>
wrote:

>Hannes
>
>> http://www.nexusdb.com/support/index.php?q=node/607

>
>YES, it is a very nice presentation !
>
>BUT...
>
>After that...how can I load/save NXServer configuration (ALIAS and
>Directories, etc.) ?


Any way you want - you have to write the methods yourself.

Regards from Germany

Franz-Leo Chomse [NexusDB Expert]
franz.leo.chomse@ndx.nexusdb_x.com (please remove "_x" to reply)
  #7  
Old 29th July 2009, 10:35 AM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: New to Triggers...

> After that...how can I load/save NXServer configuration (ALIAS and
> Directories, etc.) ?


A good place to start is likely in the nxServer source, eg
nxdmServer.pas etc.

--
Eivind Bakkestuen [NDD]
Nexus Database Systems
  #8  
Old 30th July 2009, 06:12 AM
Diniz
 
Posts: n/a
Default Re: New to Triggers...

Eivind

> A good place to start is likely in the nxServer source, eg
> nxdmServer.pas etc.


Of course, it is a good place to looking for, and I will, but, could you
give me a simple example: How create a ALIAS ?

Thanks

Diniz


  #9  
Old 30th July 2009, 08:09 AM
Hannes Danzl[NDD]
 
Posts: n/a
Default Re: New to Triggers...

Diniz wrote:

> Eivind
>
> > A good place to start is likely in the nxServer source, eg
> > nxdmServer.pas etc.

>
> Of course, it is a good place to looking for, and I will, but, could you
> give me a simple example: How create a ALIAS ?


nxuiSimpleAliasHandlerSettings.pas in the server directory shows it well. As
for getting the registered/used alias handler:

dep: TnxIterationList; {in nxllcomponent.pas }

dep:=ServerEngine.IterateDependents;
try
for i := 0 to dep.Count - 1 do begin
if (TnxComponent(dep.Items[i]) is TnxSimpleAliasHandler) then
AliasHandler:=TnxSimpleAliasHandler(dep.Items[i]);
finally
dep.free;
end;

The same applies for all other sub engines. there's a nxui*.pas in the server
directory showing how to use it and getting the class is the same as above.


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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Playing with triggers ... Roberto Nicchi nexusdb.public.support.sql 5 7th December 2008 08:29 AM
Triggers Wolfgang nexusdb.public.discussions 9 9th October 2007 04:16 PM
Triggers Wolfgang nexusdb.public.support.sql 2 5th October 2007 01:31 AM
Triggers Ken Randall nexusdb.public.support.sql 6 2nd August 2006 12:46 AM
Triggers Ken Randall nexusdb.public.support.sql 4 20th October 2005 04:57 AM


All times are GMT +11. The time now is 05:57 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.