Click here to Skip to main content
15,400,295 members
Home / Discussions / Database
   

Database

 
QuestionHow to audit user activities in ms access Pin
Mekong River7-Dec-05 15:40
MemberMekong River7-Dec-05 15:40 
AnswerRe: How to audit user activities in ms access Pin
S Douglas8-Dec-05 0:47
professionalS Douglas8-Dec-05 0:47 
GeneralRe: How to audit user activities in ms access Pin
Mekong River8-Dec-05 4:28
MemberMekong River8-Dec-05 4:28 
QuestionUsing SQLXML, Bulk Insert XML with IDENTITY Column ... Pin
cmacgowan7-Dec-05 8:53
Membercmacgowan7-Dec-05 8:53 
Questiontrace the computer name Pin
Goodway7-Dec-05 4:14
MemberGoodway7-Dec-05 4:14 
AnswerRe: trace the computer name Pin
miah alom7-Dec-05 6:53
Membermiah alom7-Dec-05 6:53 
GeneralRe: trace the computer name Pin
Goodway9-Dec-05 5:39
MemberGoodway9-Dec-05 5:39 
GeneralRe: trace the computer name Pin
miah alom9-Dec-05 5:55
Membermiah alom9-Dec-05 5:55 
I have solved this problem in a different way. When the user logs in to the application, I insert the kerberos user id and the hostname in a Activity table. But there is a limitation. One user cannot start two instances of the application from the same host.

So when there is a update or delete or insert, I pick up the value from this table.

Everytime the user logs in, I clear the Activity for that user in a host machine.

CREATE PROCEDURE ValidateUser (
@userid varchar(10) )
AS
DECLARE @cnt int
BEGIN

DELETE FROM Activity
WHERE Host = host_name()
INSERT INTO Activity VALUES(host_name(),@userid)

SELECT @cnt = count(*)
FROM Users
WHERE ID = @userid

IF @cnt = 1
SELECT 1
ELSE
SELECT 0

END

In the trigger I do something like

IF @@rowcount = 0
RETURN

SELECT @user = CurrentUser
FROM Activity
WHERE Host = host_name()

IF UPDATE(Column1)
INSERT INTO AuditTrail
SELECT @user,getdate(),'Table1','Column1' --blah blah
FROM deleted,inserted
WHERE -------------------

Does this help.
Questiondataset getchanges() question Pin
NikoTanghe7-Dec-05 0:58
MemberNikoTanghe7-Dec-05 0:58 
AnswerRe: dataset getchanges() question Pin
jonathan157-Dec-05 3:55
Memberjonathan157-Dec-05 3:55 
GeneralRe: dataset getchanges() question Pin
miah alom7-Dec-05 4:54
Membermiah alom7-Dec-05 4:54 
Questionms sql server biggest data type Pin
kasko_6-Dec-05 15:05
Memberkasko_6-Dec-05 15:05 
AnswerRe: ms sql server biggest data type Pin
toxcct6-Dec-05 22:43
Membertoxcct6-Dec-05 22:43 
AnswerRe: ms sql server biggest data type Pin
Daniel Santillanes7-Dec-05 13:39
professionalDaniel Santillanes7-Dec-05 13:39 
QuestionHow to create a code parser? Pin
Lord Kixdemp6-Dec-05 12:35
MemberLord Kixdemp6-Dec-05 12:35 
AnswerRe: How to create a code parser? Pin
toxcct6-Dec-05 22:31
Membertoxcct6-Dec-05 22:31 
GeneralRe: How to create a code parser? Pin
Lord Kixdemp10-Dec-05 9:25
MemberLord Kixdemp10-Dec-05 9:25 
QuestionExport public keys from certificate Pin
Russell Jones6-Dec-05 4:13
MemberRussell Jones6-Dec-05 4:13 
QuestionToWords() Method within crystal Report Pin
achrafus6-Dec-05 2:07
Memberachrafus6-Dec-05 2:07 
AnswerRe: ToWords() Method within crystal Report Pin
Russell Jones6-Dec-05 4:25
MemberRussell Jones6-Dec-05 4:25 
AnswerRe: ToWords() Method within crystal Report Pin
Russell Jones6-Dec-05 5:23
MemberRussell Jones6-Dec-05 5:23 
GeneralRe: ToWords() Method within crystal Report Pin
achrafus7-Dec-05 7:40
Memberachrafus7-Dec-05 7:40 
GeneralRe: ToWords() Method within crystal Report Pin
Russell Jones7-Dec-05 22:35
MemberRussell Jones7-Dec-05 22:35 
GeneralRe: ToWords() Method within crystal Report Pin
achrafus7-Dec-05 23:59
Memberachrafus7-Dec-05 23:59 
QuestionWhat Isolation Level should I use Pin
The Liquidian6-Dec-05 1:30
MemberThe Liquidian6-Dec-05 1:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.