Solved

Logging userinfo. (asp/sql server)

Posted on 1998-10-14
5
257 Views
Last Modified: 2013-12-25
I have sql server 7, iis 4 and vb 6.

I want to log what ever users do in the sql server. To do that i need to know which user does which thing. How do i do this with asp or an iis-application???
0
Comment
Question by:osthus
  • 3
  • 2
5 Comments
 

Author Comment

by:osthus
Comment Utility
Edited text of question
0
 
LVL 28

Accepted Solution

by:
sybe earned 200 total points
Comment Utility
- 1. Another way is analysing the server-log file, there is all information you need. there are applications available that make it very easy to analyze the log file (WebTrends).

- 2. When users are logged in on NT, then in ASP you can get the username with
Request.ServerVariables("LOGON_USER")
In every ASP page you could write a few lines of code to put in the database which user looked at which page at what time

strSQL = "INSERT table (username,page,access_date) value (" &_
Request.ServerVariables("LOGON_USER") & ", " &_
Request.ServerVariables("PATH_INFO") & ", " &_
"CONVERT(DateTime,'" & Date() & "',103) )"

' supposing you already have a connection to the database called "Conn":

Conn.Execute(strSQL)

0
 

Author Comment

by:osthus
Comment Utility
to sybe

Sorry, let me refrase my question.

I'm making a iis/asp application which make it possible to interact with the sql-server. What web-users does is what i want to log.

The problem is that its multiple users and one iis-application.

Anyway, Using NT-security is a good proposal, but how can I use the security used in SQL-server??
0
 
LVL 28

Expert Comment

by:sybe
Comment Utility
Make a login page. Store the username/password in SessionVariables and use those in the ODBC connection string:

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DSN=YourDSN;SERVER:servername;UID=" & Session("username") & ";PWD=" & Session("password") & ";APP=;DATABASE=Databasename"

0
 

Author Comment

by:osthus
Comment Utility
thanks a lot, im using nt-secrity in a connection string......-
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Pick image, show data 4 33
WPF issue with Trigger 2 65
Where is the title coming from 6 48
Finding a free PC on campus 6 51
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now