Forum Moderators: open
Here is what i'm starting with:
(to capture logon name)
<%
Dim sDomain
Dim sLogonUser
Dim sUserName
sLogonUser = Request.ServerVariables("AUTH_USER")
sDomain = Left(sLogonUser, InStr(1, sLogonUser, "\", vbTextCompare) -1)
sUserName = Right(sLogonUser, Len(sLogonUser) - InStr(1, sLogonUser, "\", vbTextCompare))
'sDomain = Mid(sLogonUser, 1, Len(sLogonUser) - InStr(1, sLogonUser, "\", vbTextCompare) + 1)
'sUserName = Mid(sLogonUser, InStr(1, sLogonUser, "\") + 1)
%>
(to open the db)
<%
dim oRSst
dim strSQL
Dim Conn
Dim ConnStr
Dim uSQL
Set conn = Server.CreateObject("ADODB.Connection") ' Create your connection object
connStr = "DSN=NHO; uid=orientation; pwd=nHouser01" ' Get database path
Conn.Open connStr ' Open the connection to the database
strSQL = "Select * From quizname Where uid = ('" & sUserName & "') ORDER BY date DESC"
%>
<%
Set oRSst = Server.CreateObject("ADODB.Recordset") 'Create your recordset object
oRSst.Open strSQL,Conn 'Open the recordset
%>
(to close the db)
<%
oRSst.Close ' Lets close the recordset object
Conn.Close ' Lets close the connection object
' Clear the variables
Set oRSst=Nothing
Set Conn=Nothing
%>
i just need help with the meat inside. Thanks in advance!