Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Get Computer Name
Sat, Sep 5 2009 7:37 PMPermanent Link

Jianfei Xu
I create trigger on all tables to track the deletions.

I need to be able to track the deletion from which computer in the trigger. How can I do that?


Many thanks,

Jianfei
Sun, Sep 6 2009 7:57 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Jianfei,

I'm not sure I understand what you want to do: do you mean you want to identify,
from inside the trigger, what computer fired it?
Also, are you using Client/Server or File Sharing?

--
Fernando Dias
[Team Elevate]
Sun, Sep 6 2009 11:02 AMPermanent Link

Jianfei Xu
Hi, Fernando:

Yes, I want to identify from inside the trigger what computer fired it.

I am just using the file sharing.

Jianfei
Sun, Sep 6 2009 5:51 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Jianfei,

Since you are using file sharing the trigger is executed at the computer that
fires it, but I don't know any way to get the computer id except to create an
external function, in a DLL, that returns the computer name and call it from
inside the trigger. You can get help on the syntax to create external functions
here:
http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=10&topic=162

If what you wanted to get was the user name, then you could get it with the
function CURRENT_USER, but the computer id, I really don't know of a better
solution... I hope someone else here can come up with something better..

--
Fernando Dias
[Team Elevate]
Tue, Sep 8 2009 12:35 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jianfei,

<< I need to be able to track the deletion from which computer in the
trigger. How can I do that? >>

Fernando is correct - you can't do so currently without using an external
procedure.  However, I'll see about adding such an SQL function.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image