blog mod - help - نوشته شده در (4026 Views)
Junior Member
phoenixtaz13
مطلب: 129
129
good day to all.... :)

i cant seem to find my old post... :(

anyways, carefree assisted me on this mod... everything were working fine... until i ran into this prob.... when i decided to lock the post or topic i encountered an error...
heres the error message:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'objRec'
/forum/blogs.asp, line 160

and it points out to the one in red:
set objRec = my_Conn.Execute(strSql)
DTString = " WebBlogs "
if not objRec.BOF and not objRec.EOF then
if Request.QueryString("member") <> "" or Request.QueryString("log_id") <> "" then
DTString = " <a href=""blogs.asp?member=" & objRec("MEMBER_ID") & """>Back to " & objRec("M_NAME") & "'s Blog list</a>"
end if
else
DTString = "&nbspNothing found !"
set objRec=Nothing
set objDict=Nothing
end if
TMember_ID = objRec("MEMBER_ID")
tried searching for the prob, no luck... :(
any help would be greatly appreciated... :)

thanks...
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
you have set objRec= Nothing prior to the end if statement and then you are trying to access objRec("MEMBER_ID") after the end if

you need to move set objRec=Nothing so that it is after the TMember_ID = objRec("MEMBER_ID")
نوشته شده در
Junior Member
phoenixtaz13
مطلب: 129
129
hi huwr.... :)

thank you very much for looking into my prob.... greatly appreciate it.... :)

i tried moving the set objRec=Nothing and its giving me numerous errors... :(

im not really good at this.... hope u can take a look at my file pls....
heres my blog.txt file:
http://cid-712c33ce341411d8.skydrive.live.com/embedgrid.aspx/.Public/blog.txt

thanks....
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
report the errors, I can't look for something if I don't know what I'm looking for
نوشته شده در
Forum Moderator
AnonJr
مطلب: 5768
5768
For the segment posted above, you may want to try:
Code:
set objRec = my_Conn.Execute(strSql)
DTString = " WebBlogs "
if not objRec.BOF and not objRec.EOF then
TMember_ID = objRec("MEMBER_ID")
if Request.QueryString("member") <> "" or Request.QueryString("log_id") <> "" then
DTString = " <a href=""blogs.asp?member=" & objRec("MEMBER_ID") & """>Back to " & objRec("M_NAME") & "'s Blog list</a>"
end if
else
DTString = "&nbspNothing found !"
set objRec=Nothing
set objDict=Nothing
end if

I'd look a little more but my coffee break isn't that long. wink
نوشته شده در
Junior Member
phoenixtaz13
مطلب: 129
129
hello huwr.... :)

i deleted the file where i made changes with what u suggested... i'm back to square one.... the problem remains the same as to my first post..... :(

thanks..... :)

نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
did you try anon's suggestion above ?
نوشته شده در
Junior Member
phoenixtaz13
مطلب: 129
129
hi HuwR and Anonjr.... :)

i tried what anonjr suggested.... and its now pointing to a new problem... :(

error message:
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required
/forum/blogs.asp, line 287

blogs.asp file points to the one in red:
if Request.QueryString("log_id") = "" then
' #### Table for the topic list..... Response.Write " <table align=""center"" colspan=""2"" cellspacing=""1"" cellpadding=""10"" border=""0"" width=""70%"">" & vbNewLine
else
' #### Tables for viewing blog topic.... Response.Write " <table align=""center"" colspan=""2"" cellspacing=""1"" cellpadding=""10"" border=""0"" bgcolor=""" & strTableBorderColor & """ width=""100%"">" & vbNewLine
end if
counter = 1
while not objRec.EOF 'this is line 287......... if counter > 1 then Response.Write ""
counter = counter + 1
T_Subject = objRec("T_SUBJECT")
T_View_Count = objRec("T_VIEW_COUNT")
T_Author = objRec("T_AUTHOR")
MEMBER_ID = objRec("MEMBER_ID")
M_NAME = objRec("M_NAME")
M_TITLE = objRec("M_TITLE")
M_LEVEL = objRec("M_LEVEL")
M_POSTS = objRec("M_POSTS")


thanks again....

نوشته شده در
Advanced Member
Carefree
مطلب: 4224
4224
The only thing that I can see which may cause that error would be if one of the included files closed the objRec. Take a look there.
نوشته شده در
Junior Member
phoenixtaz13
مطلب: 129
129
hi carefree.... :)

are u referring to this <!--#INCLUDE FILE="include/inc_spacer.asp"-->?
heres the content of inc_spacer.asp file:
<table width="100%" cellpadding="0" cellspacing="0"><tr><td><img src="<%= strImageURL %>spacer.gif" width="1" height="3" border="0" alt=""></td></tr></table>

error message:
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required
/forum/blogs.asp, line 287

the error message above means that objRec is being closed?.... and to solve my problem is to search and remove the code that closed the objRec, right?....
i scrolled up and down already, cant find it.... :(

after trial and error.... found the thing thats closing objRec

the one in red is the one closing the the objRec
set objRec = my_Conn.Execute(strSql)
DTString = " WebBlogs "
if not objRec.BOF and not objRec.EOF then
TMember_ID = objRec("MEMBER_ID")
if Request.QueryString("member") <> "" or Request.QueryString("log_id") <> "" then
DTString = " <a href=""blogs.asp?member=" & objRec("MEMBER_ID") & """>Back to " & objRec("M_NAME") & "'s Blog list</a>"
end if
else
DTString = " Nothing found !"
'set objRec=Nothing 'i commented this out set objDict=Nothing
end if


and then, i inserted this:
if strShowQuickReply = "1" and strDBNTUserName <> "" and ((Cat_Status = 1) and (Forum_Status = 1) and (Topic_Status = 1)) and ArchiveView = "" then
call QuickReply()
end if


theres no more error... but my next problem is that, the content of the topic is not showing.... :(

for the topic or post to show, i have to unlock the topic.... :(

any ideas how to fix this?....
thanks again...
نوشته شده در
Advanced Member
Carefree
مطلب: 4224
4224
if strShowQuickReply = "1" and strDBNTUserName <> "" and ((Cat_Status = 1) and (Forum_Status = 1) and (Topic_Status = 1)) and ArchiveView = "" then
Removing the requirement for "Topic_Status" to equal one will display all the topics (locked/unlocked).
شما باید یک متن وارد کنید