DateTimeStamp - can I set vDB to automate my DTStamp?
    Thorsten Hohage 
    thohage at genericobjects.de
       
    Sat Mar 24 18:44:31 CDT 2012
    
    
  
Hi Barry,
On 2012-03-25, at 00:39, Barry G. Sumpter wrote:
> Is there a way to automate Valentina to do the DateTimeStamp work for me?
perhaps I'm way to tired, but do you want Valentina automatically create a timestamp when you insert or update a record?
Then you need a trigger, I attached two of mine below.
Btw. when connecting to Valentina, I put the current OS user name as a connection property so I can set the name automatically.
Hope this is what you asked for.
regards,
Thorsten Hohage
-- 
Valentina Technology Evangelist
generic objects  GmbH - Leiter Solution Center Nord
CREATE OR replace TRIGGER "TRCArticle_BI" BEFORE INSERT ON "TRCArticle"
FOR EACH ROW
	BEGIN
		new.creationStamp = now();
		new.changeStamp = now();
		declare cUser VARCHAR(256);
		Set cUser = get property currentUser of connection;
		new.creationUser = cUser;
		new.changeUser = cUser; 
	END;
CREATE OR replace TRIGGER "TRCArticle_BU" BEFORE UPDATE ON "TRCArticle"
FOR EACH ROW
	BEGIN
		new.changeStamp = now();
		declare cUser VARCHAR(256);
		Set cUser = get property currentUser of connection;
		new.changeUser = cUser; 
	END;
    
    
More information about the Valentina
mailing list