I am getting this error message any Clues?:
Microsoft VBScript runtime error '800a0046'
Permission denied: 'GetObject'
/first_visit.asp, line 255
'Can't find user profile...must be first visit to Intranet...
'Are we actually adding the user?
If WT.GetVariable("action", "string") = "create" Then
set rs=server.CreateObject("adodb.recordset")
sql="select max(userid) from users"
rs=db.Execute(sql)
maxid=int(rs(0))
set rs=nothing
maxid=maxid+1
'Insert a new user record
SQL = "INSERT INTO Users (UserID, UserName, FullName, NotesName, NotesMailFile, LocationID, FirstVisit, UserAgent, LastUpdate, GroupAccount, ShowWeather, ShowWebCam, ShowExternalNews, EmployeeID, ShowBusiness, ShowTechnology, ShowSports, ShowEntertainment, ShowInternalNews, ShowAutomotive, EMailSubscriptions) VALUES "
SQL = SQL & " ( " & maxid
SQL = SQL & ", " & LCase(sqlstring(sUserName))
SQL = SQL & ", " & sqlstring(WT.GetVariable("FullName", "string"))
SQL = SQL & "," & sqlstring(WT.GetVariable("NotesName", "string"))
SQL = SQL & ", " & sqlstring(WT.GetVariable("NotesMailFile", "string"))
SQL = SQL & ", " & wt.GetVariable("LocationID", "numeric")
SQL = SQL & ", '" & FormatDateTime(Date, vbShortDate) & "'"
SQL = SQL & ", " & sqlstring(Request.ServerVariables("HTTP_USER_AGENT"))
SQL = SQL & ", '" & FormatDateTime(Date, vbShortDate) & "'"
SQL = SQL & ", 0, 0, 1, 0"
SQL = SQL & ", " & WT.GetVariable("EmployeeID", "numeric")
SQL = SQL & ", 1, 0, 0, 0, 1, 0, 1)"
'SQL = "INSERT INTO Users (UserID, UserName, FullName, NotesName, NotesMailFile, LocationID, FirstVisit, UserAgent, LastUpdate, GroupAccount, ShowWeather, ShowWebCam, ShowExternalNews, EmployeeID, ShowBusiness, ShowTechnology, ShowSports, ShowEntertainment, ShowInternalNews, ShowAutomotive, EMailSubscriptions) VALUES "
'SQL = SQL & "(UserID.NextVal"
'SQL = SQL & ", " & LCase(WT.SQLEncodeString2(sUserName))
'SQL = SQL & ", " & WT.SQLEncodeString2(WT.GetVariable("FullName", "string"))
'SQL = SQL & ", " & WT.SQLEncodeString2(WT.GetVariable("NotesName", "string"))
'SQL = SQL & ", " & WT.SQLEncodeString2(WT.GetVariable("NotesMailFile", "string"))
'SQL = SQL & ", " & WT.GetVariable("LocationID", "numeric")
'SQL = SQL & ", TO_DATE('" & FormatDateTime(Date, vbShortDate) & "', 'mm/dd/rr')"
'SQL = SQL & ", " & WT.SQLEncodeString2(Request.ServerVariables("HTTP_USER_AGENT"))
'SQL = SQL & ", TO_DATE('" & FormatDateTime(Date, vbShortDate) & "', 'mm/dd/rr')"
'SQL = SQL & ", 0, 0, 1, 0"
'SQL = SQL & ", " & WT.GetVariable("EmployeeID", "numeric")
'SQL = SQL & ", 1, 0, 0, 0, 1, 0, 1)"
DB.Execute(SQL)
%>
<p class="status">You have been successfully registered.</p>
<p><a href="/">Click here to visit Webster</a>.</p>
<%
Else
'Obtain current user's full name
'Use ADSI services
NOTE: Set oUser = GetObject("WinNT://" & DomainName & "/" & sUserName)
sFullName = oUser.FullName
Set oUser = Nothing
Microsoft VBScript runtime error '800a0046'
Permission denied: 'GetObject'
/first_visit.asp, line 255
'Can't find user profile...must be first visit to Intranet...
'Are we actually adding the user?
If WT.GetVariable("action", "string") = "create" Then
set rs=server.CreateObject("adodb.recordset")
sql="select max(userid) from users"
rs=db.Execute(sql)
maxid=int(rs(0))
set rs=nothing
maxid=maxid+1
'Insert a new user record
SQL = "INSERT INTO Users (UserID, UserName, FullName, NotesName, NotesMailFile, LocationID, FirstVisit, UserAgent, LastUpdate, GroupAccount, ShowWeather, ShowWebCam, ShowExternalNews, EmployeeID, ShowBusiness, ShowTechnology, ShowSports, ShowEntertainment, ShowInternalNews, ShowAutomotive, EMailSubscriptions) VALUES "
SQL = SQL & " ( " & maxid
SQL = SQL & ", " & LCase(sqlstring(sUserName))
SQL = SQL & ", " & sqlstring(WT.GetVariable("FullName", "string"))
SQL = SQL & "," & sqlstring(WT.GetVariable("NotesName", "string"))
SQL = SQL & ", " & sqlstring(WT.GetVariable("NotesMailFile", "string"))
SQL = SQL & ", " & wt.GetVariable("LocationID", "numeric")
SQL = SQL & ", '" & FormatDateTime(Date, vbShortDate) & "'"
SQL = SQL & ", " & sqlstring(Request.ServerVariables("HTTP_USER_AGENT"))
SQL = SQL & ", '" & FormatDateTime(Date, vbShortDate) & "'"
SQL = SQL & ", 0, 0, 1, 0"
SQL = SQL & ", " & WT.GetVariable("EmployeeID", "numeric")
SQL = SQL & ", 1, 0, 0, 0, 1, 0, 1)"
'SQL = "INSERT INTO Users (UserID, UserName, FullName, NotesName, NotesMailFile, LocationID, FirstVisit, UserAgent, LastUpdate, GroupAccount, ShowWeather, ShowWebCam, ShowExternalNews, EmployeeID, ShowBusiness, ShowTechnology, ShowSports, ShowEntertainment, ShowInternalNews, ShowAutomotive, EMailSubscriptions) VALUES "
'SQL = SQL & "(UserID.NextVal"
'SQL = SQL & ", " & LCase(WT.SQLEncodeString2(sUserName))
'SQL = SQL & ", " & WT.SQLEncodeString2(WT.GetVariable("FullName", "string"))
'SQL = SQL & ", " & WT.SQLEncodeString2(WT.GetVariable("NotesName", "string"))
'SQL = SQL & ", " & WT.SQLEncodeString2(WT.GetVariable("NotesMailFile", "string"))
'SQL = SQL & ", " & WT.GetVariable("LocationID", "numeric")
'SQL = SQL & ", TO_DATE('" & FormatDateTime(Date, vbShortDate) & "', 'mm/dd/rr')"
'SQL = SQL & ", " & WT.SQLEncodeString2(Request.ServerVariables("HTTP_USER_AGENT"))
'SQL = SQL & ", TO_DATE('" & FormatDateTime(Date, vbShortDate) & "', 'mm/dd/rr')"
'SQL = SQL & ", 0, 0, 1, 0"
'SQL = SQL & ", " & WT.GetVariable("EmployeeID", "numeric")
'SQL = SQL & ", 1, 0, 0, 0, 1, 0, 1)"
DB.Execute(SQL)
%>
<p class="status">You have been successfully registered.</p>
<p><a href="/">Click here to visit Webster</a>.</p>
<%
Else
'Obtain current user's full name
'Use ADSI services
NOTE: Set oUser = GetObject("WinNT://" & DomainName & "/" & sUserName)
sFullName = oUser.FullName
Set oUser = Nothing