Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Member Spotlight Mod Error - 800a0bb9
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MaGraham
Senior Member

USA
1297 Posts

Posted - 08 January 2013 :  18:26:15  Show Profile  Reply with Quote

I am receiving the following error message in the "Member Spotlight" mod:

Member Spotlight
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/tfp/inc_member_spotlight.asp, line 18


Here are lines 13 - 23


set rsMemInSpot = Server.CreateObject("ADODB.Recordset")
strSql = "SELECT " & strTablePrefix & "MEMBERS.MEMBER_ID, " & strTablePrefix & "MEMBERS.M_AVATAR_URL, " & strTablePrefix & "MEMBERS.M_NAME, "
strSql = strSql & strTablePrefix & "MEMBERS.M_FIRSTNAME, " & strTablePrefix & "MEMBERS.M_LASTNAME, " & strTablePrefix & "MEMBERS.M_AGE"
strSql = strSql & " FROM " & strTablePrefix & "MEMBERS"
strSql = strSql & " WHERE FORUM_MEMBERS.M_AVATAR_URL <> ''"
rsMemInSpot.Open strSql, my_Conn,3,,adCmdText
Dim intRnd
Randomize Timer
intRnd = (Int(RND * rsMemInSpot.RecordCount))
rsMemInSpot.Move intRnd
strMemInSpot = rsMemInSpot("M_AVATAR_URL")



Any ideas?


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 08 January 2013 :  18:41:43  Show Profile
I redid that whole thing some time ago. Try this:


<%
intMem = 0
Set rsMemInSpot = Server.CreateObject("ADODB.Recordset")
strSql = "SELECT COUNT(M_PHOTO_URL) AS CNT FROM " & strMemberTablePrefix & "MEMBERS WHERE M_PHOTO_URL <> ''"
Set rsMemInSpot = my_Conn.Execute(strSql)
If not rsMemInSpot.EOF Then
	intMem=rsMemInSpot("CNT")
	rsMemInSpot.Close
End If
Set rsMemInSpot = Nothing
If intMem > 0 Then
	strSql = "SELECT MEMBER_ID, M_PHOTO_URL, M_NAME, M_FIRSTNAME, M_LASTNAME, M_AGE, M_LEVEL FROM " & strMemberTablePrefix & "MEMBERS WHERE M_PHOTO_URL <> ''"
	Set rsMemInSpot = my_Conn.Execute(strSql)
	If not rsMemInSpot.EOF Then
		Randomize
		intRnd = (Int(RND * intMem))
		rsMemInSpot.Move intRnd
		strMemInSpot = rsMemInSpot("M_PHOTO_URL")
		If rsMemInSpot("M_LEVEL") > "2" Then 
			strCColor=strAUAdminColor
		ElseIf rsMemInSpot("M_LEVEL") = "2" Then 
			strCColor=strAUModColor
		Else
			strCColor=strAUMemColor
		End If
		Response.Write "<table align=""left"" width=""125"" border=""0"" cellspacing=""0"" cellpadding=""0"" bgcolor=" & strHeadCellColor & ">" & vbNewLine & _
			"	<tr>" & vbNewLine & _ 
			"		<td align=""left"" valign=""top"">" & vbNewLine & _
			"			<table align=""left"" BORDER=""0"" bordercolor=""" & strTableBorderColor & """ style=""border-collapse:collapse;"" cellspacing=""0"" cellpadding=""0"" width=""95%"">" & vbNewLine & _
			"				<tr>" & vbNewLine & _
			"					<td valign=""top"">" & vbNewLine & _
			"						<table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%"">" & vbNewLine & _
			"							<tr>" & vbNewLine & _
			"								<td align=""center"" bgcolor=""" & strHeadCellColor & """>" & vbNewLine & _
			"									<table width=""100%"" cellpadding=""2"">" & vbNewLine & _
			"										<tr>" & vbNewLine & _
			"											<td valign=""top"" align=""center""><font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """>Member Spotlight</font></td>" & vbNewLine & _
			"										</tr>" & vbNewLine & _
			"									</table>" & vbNewLine & _
			"								</td>" & vbNewLine & _
			"							</tr>" & vbNewLine & _
			"							<tr>" & vbNewLine & _ 
			"								<td bgcolor=""" & strForumCellColor & """>" & vbNewLine & _ 
			"									<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""2"">" & vbNewLine & _
			"										<tr>" & vbNewLine & _
			"											<td align=center bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
			"												<a href=""" & strForumURL & "pop_profile.asp?mode=display&id="& rsMemInSpot("member_id") & """><font face=""" & strDefaultFontFace & """ color=""" & strCColor & """ size=""" & strDefaultFontSize & """><b>" & rsMemInSpot("M_NAME") & "</b></font></A><br>" & vbNewLine
		If Trim(rsMemInSpot("M_PHOTO_URL")) <> "" and (lcase(rsMemInSpot("M_PHOTO_URL")) <> "http://" or lcase(rsMemInSpot("M_PHOTO_URL")) <> "https://") Then
			If lcase(left(strMemInSpot,7)) = "http://" or  lcase(left(strMemInSpot,8)) = "https://" Then 
				Response.Write	"											<a href=" & ChkString(rsMemInSpot("M_PHOTO_URL"), "display")& ">" & vbNewLine & _
					"												<img src=" & ChkString(rsMemInSpot("M_PHOTO_URL"), "display") & vbNewLine
			ElseIf lcase(left(strMemInSpot,7)) <> "http://" Then 
				Response.Write	"											<a href=" & strForumURL & ChkString(rsMemInSpot("M_PHOTO_URL"), "display")& ">" & vbNewLine & _
					"											<img src=" & strForumURL & ChkString(rsMemInSpot("M_PHOTO_URL"), "display")& vbNewLine
			End If			
			Response.Write	"											alt=" & ChkString(rsMemInSpot("M_NAME"),"display")& vbNewLine & _
				"											width=""120"" height=""120"" border=""0"" hspace=""0"" vspace=""4""></a><br>" & vbNewLine
		Else 
			Response.Write	getCurrentIcon(strIconPhotoNone,"No Photo Available","hspace=""0"" vspace=""4""") & "<br>" & vbNewLine _
		End If
		Response.Write	"											<a href=""" & strForumURL & "pop_profile.asp?mode=display&id="& rsMemInSpot("member_id") & """><font face=""" & strDefaultFontFace & """ color=""" & strCColor & """ size=""" & strFooterFontSize & """>" & rsMemInSpot("M_NAME") & "'s Profile</font></A><br>" & vbNewLine & _
			"										</td>" & vbNewLine & _
 			"									</tr>"
		rsMemInSpot.Close
		Response.Write	"									</table>" & vbNewLine & _
			"								</td>" & vbNewLine & _
			"							</tr>" & vbNewLine & _
			"						</table>" & vbNewLine & _
			"					</td>" & vbNewLine & _
			"				</tr>" & vbNewLine & _
			"			</table>" & vbNewLine & _
			"		</td>" & vbNewLine & _
			"	</tr>" & vbNewLine & _
			"</table>"
	End If
	Set rsMemInSpot = Nothing
End If
%>
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 08 January 2013 :  20:14:56  Show Profile


Used that and received this error:


Microsoft VBScript runtime error '800a01a8'

Object required: ''

/tfp/inc_member_spotlight.asp, line 5


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 09 January 2013 :  01:15:30  Show Profile

I'm sorry; I failed to mention that something went wrong when I did "Zuel's Avatar" mod. The mod works fine; members can now upload their own avatar and the avatars display fine, too. But if a member has a URL for a picture in his/her profile area, it will only display the red x. However; it will display the picture if someone clicks on the red x. Of course no one would think to do that, I'm sure. So, I disabled that feature rather than ask someone to help me. At that time, I thought the avatar was sufficient for the members but now I'm wondering if the "Member Spotlight" mod requires that feature to be on and for it to display their picture in their profile area. Am I making sense with this? I sure hope so!

If this mod does require the members to have the URL/picture in their profile, will it display an error when it selects a member who doesn't?

All members do have an avatar in their profile so I would like to know if this mod would/could work with those?

My mind is tired so again, I do hope this makes sense!



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 09 January 2013 :  07:03:20  Show Profile
No, that's an indication that the connection to the database has been closed by some other mod. We can reopen it in this mod, but if it's already open when you try to use it, it'll result in a different error.

So, we'll tell it to ignore the error and continue.


<%
intMem = 0
On Error Resume Next
Set rsMemInSpot = Server.CreateObject("ADODB.Recordset")
my_Conn.Open strConnString
strSql = "SELECT COUNT(M_PHOTO_URL) AS CNT FROM " & strMemberTablePrefix & "MEMBERS WHERE M_PHOTO_URL <> ''"
Set rsMemInSpot = my_Conn.Execute(strSql)
If not rsMemInSpot.EOF Then
	intMem=rsMemInSpot("CNT")
	rsMemInSpot.Close
End If
Set rsMemInSpot = Nothing
If intMem > 0 Then
	strSql = "SELECT MEMBER_ID, M_PHOTO_URL, M_NAME, M_FIRSTNAME, M_LASTNAME, M_AGE, M_LEVEL FROM " & strMemberTablePrefix & "MEMBERS WHERE M_PHOTO_URL <> ''"
	Set rsMemInSpot = my_Conn.Execute(strSql)
	If not rsMemInSpot.EOF Then
		Randomize
		intRnd = (Int(RND * intMem))
		rsMemInSpot.Move intRnd
		strMemInSpot = rsMemInSpot("M_PHOTO_URL")
		If rsMemInSpot("M_LEVEL") > "2" Then 
			strCColor=strAUAdminColor
		ElseIf rsMemInSpot("M_LEVEL") = "2" Then 
			strCColor=strAUModColor
		Else
			strCColor=strAUMemColor
		End If
		Response.Write "<table align=""left"" width=""125"" border=""0"" cellspacing=""0"" cellpadding=""0"" bgcolor=" & strHeadCellColor & ">" & vbNewLine & _
			"	<tr>" & vbNewLine & _ 
			"		<td align=""left"" valign=""top"">" & vbNewLine & _
			"			<table align=""left"" BORDER=""0"" bordercolor=""" & strTableBorderColor & """ style=""border-collapse:collapse;"" cellspacing=""0"" cellpadding=""0"" width=""95%"">" & vbNewLine & _
			"				<tr>" & vbNewLine & _
			"					<td valign=""top"">" & vbNewLine & _
			"						<table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%"">" & vbNewLine & _
			"							<tr>" & vbNewLine & _
			"								<td align=""center"" bgcolor=""" & strHeadCellColor & """>" & vbNewLine & _
			"									<table width=""100%"" cellpadding=""2"">" & vbNewLine & _
			"										<tr>" & vbNewLine & _
			"											<td valign=""top"" align=""center""><font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """>Member Spotlight</font></td>" & vbNewLine & _
			"										</tr>" & vbNewLine & _
			"									</table>" & vbNewLine & _
			"								</td>" & vbNewLine & _
			"							</tr>" & vbNewLine & _
			"							<tr>" & vbNewLine & _ 
			"								<td bgcolor=""" & strForumCellColor & """>" & vbNewLine & _ 
			"									<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""2"">" & vbNewLine & _
			"										<tr>" & vbNewLine & _
			"											<td align=center bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
			"												<a href=""" & strForumURL & "pop_profile.asp?mode=display&id="& rsMemInSpot("member_id") & """><font face=""" & strDefaultFontFace & """ color=""" & strCColor & """ size=""" & strDefaultFontSize & """><b>" & rsMemInSpot("M_NAME") & "</b></font></A><br>" & vbNewLine
		If Trim(rsMemInSpot("M_PHOTO_URL")) <> "" and (lcase(rsMemInSpot("M_PHOTO_URL")) <> "http://" or lcase(rsMemInSpot("M_PHOTO_URL")) <> "https://") Then
			If lcase(left(strMemInSpot,7)) = "http://" or  lcase(left(strMemInSpot,8)) = "https://" Then 
				Response.Write	"											<a href=" & ChkString(rsMemInSpot("M_PHOTO_URL"), "display")& ">" & vbNewLine & _
					"												<img src=" & ChkString(rsMemInSpot("M_PHOTO_URL"), "display") & vbNewLine
			ElseIf lcase(left(strMemInSpot,7)) <> "http://" Then 
				Response.Write	"											<a href=" & strForumURL & ChkString(rsMemInSpot("M_PHOTO_URL"), "display")& ">" & vbNewLine & _
					"											<img src=" & strForumURL & ChkString(rsMemInSpot("M_PHOTO_URL"), "display")& vbNewLine
			End If			
			Response.Write	"											alt=" & ChkString(rsMemInSpot("M_NAME"),"display")& vbNewLine & _
				"											width=""120"" height=""120"" border=""0"" hspace=""0"" vspace=""4""></a><br>" & vbNewLine
		Else 
			Response.Write	getCurrentIcon(strIconPhotoNone,"No Photo Available","hspace=""0"" vspace=""4""") & "<br>" & vbNewLine _
		End If
		Response.Write	"											<a href=""" & strForumURL & "pop_profile.asp?mode=display&id="& rsMemInSpot("member_id") & """><font face=""" & strDefaultFontFace & """ color=""" & strCColor & """ size=""" & strFooterFontSize & """>" & rsMemInSpot("M_NAME") & "'s Profile</font></A><br>" & vbNewLine & _
			"										</td>" & vbNewLine & _
 			"									</tr>"
		rsMemInSpot.Close
		Response.Write	"									</table>" & vbNewLine & _
			"								</td>" & vbNewLine & _
			"							</tr>" & vbNewLine & _
			"						</table>" & vbNewLine & _
			"					</td>" & vbNewLine & _
			"				</tr>" & vbNewLine & _
			"			</table>" & vbNewLine & _
			"		</td>" & vbNewLine & _
			"	</tr>" & vbNewLine & _
			"</table>"
	End If
	Set rsMemInSpot = Nothing
End If
%>
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 09 January 2013 :  15:33:02  Show Profile


No errors with this, Carefree. . .but no members in the spotlight either. Nothing at all displayed.



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07