Author |
Topic |
|
phoenixtaz13
Junior Member
129 Posts |
Posted - 27 February 2009 : 06:13:19
|
another prob that i encountered, i inserted some codes in the inc_site_left.asp, the purpose of it is to get the latest post in some forum i selected, its displaying all the latest post, but when i click the topic, with all the latest post found, it only redirects me to 1 topic, i cant figure out why the links is not working or redirecting to its topic_id.... :(
same process if i insert the in inc_header.asp, but if i insert the code in default.asp, all the links of the latest post found works properly....
heres my file inc_site_left1.txt
am i missing on something?.... :(
thanks in advance.... :) < |
Edited by - phoenixtaz13 on 27 February 2009 06:26:22 |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 27 February 2009 : 06:25:59
|
Yep, you're missing something. Insert rsLatest.MoveFirst before this line do until rsLatest.EOF < |
|
|
phoenixtaz13
Junior Member
129 Posts |
Posted - 27 February 2009 : 06:42:01
|
thanks carefree.... i'll give it a try.... :)
< |
|
|
phoenixtaz13
Junior Member
129 Posts |
Posted - 27 February 2009 : 07:24:34
|
i added the missing part
heres how it looked:
set rsLatest = Server.CreateObject("ADODB.recordset")
strSQL = "Select top 4 T_LAST_POST, T_SUBJECT, TOPIC_ID from FORUM_TOPICS where FORUM_ID like '17%' order by T_LAST_POST desc;"
rsLatest.Open strSQL, latest_conn
rsLatest.MoveFirst
do until rsLatest.EOF
topic_ID = rsLatest("TOPIC_ID")
t_subject = rsLatest("T_SUBJECT")
t_date = rsLatest("T_LAST_POST")
it still wont work, it wont redirect to the right topic_id.... :( it keeps on redirecting to topic_id=3
so what i did, i inserted rsLatest.MoveFirst before do until rsLatest.EOF in all my topic forum, and then i get an error... :(
error message: ADODB.Recordset (0x800A0BCD) Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /forum/inc_site_left.asp, line 217
apprently line 217 has zero topic, it has no post yet, so i just commented out LINE 217 rsLatest.MoveFirst, and it still wont redirect to the assigned topic_id... with all the topics found, it keeps on redirecting to topic_id=3 which is the last topic from the list... :(
any more ideas?....
thanks for the time.... :) < |
Edited by - phoenixtaz13 on 27 February 2009 07:26:20 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 27 February 2009 : 18:56:16
|
I wrote you an example of pulling the last four topics (with hyperlinked subjects) from the default topics database. Adapt it as you wish....< |
Edited by - Carefree on 27 February 2009 19:04:54 |
|
|
phoenixtaz13
Junior Member
129 Posts |
Posted - 27 February 2009 : 22:39:26
|
thanks carefree..... :)
i'll give this a try... many, many thanks.... :)
< |
|
|
phoenixtaz13
Junior Member
129 Posts |
Posted - 27 February 2009 : 23:42:52
|
hi carefree,
everything inside my inc_site_left1.asp i replaced it with ur given code above, and i encountered a lot of problems..... :(
ist problem error message: Active Server Pages, ASP 0135 (0x80004005) The file 'inc_header.asp' is included by itself (perhaps indirectly). Please check include files for other Include statements. /forum/inc_site_left1.asp, line 3
my solution, i removed the <!--#INCLUDE FILE="inc_header.asp" -->
2nd problem Error message: Microsoft VBScript compilation (0x800A0411) Name redefined /forum/inc_adovbs.asp, line 14, column 6
my solution, i removed the <!--#INCLUDE FILE="config.asp" -->
3rd problem error message: Microsoft VBScript compilation (0x800A0411) Name redefined /forum/inc_sha256.asp, line 42, column 8
my solution, i removed the <!--#INCLUDE FILE="inc_sha256.asp" -->
4th problem error message:
ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/forum/Default.asp, line 111
my solution, i inserted this at the top
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/forum/db/snitz.mdb")
set my_conn=Server.CreateObject("ADODB.Connection")
my_conn.Open strConnString
and i still get this error: ADODB.Recordset (0x800A0E7D) The connection cannot be used to perform this operation. It is either closed or invalid in this context. /forum/Default.asp, line 111
what will i do next?...
and i also wonder why my own code wont work properly.... i even made a file latest.asp, and saved all my codes in it, and then inserted this<!--#INCLUDE FILE="latest.asp" --> in inc_header.asp right after <!--#INCLUDE FILE="config.asp" -->, but the problem to it when i click the found latest hyper link post topic, it only redirects me to topic_id=3.... and if i insert this<!--#INCLUDE FILE="latest.asp" --> in default.asp right after <!--#INCLUDE FILE="config.asp" -->, the found latest hyper link post topic works properly..... but if i do that, i have to insert this <!--#INCLUDE FILE="latest.asp" --> to all asp page(like member.asp, active.asp, register.asp, etc...).
any ideas to why its acting strangely?....
thanks for ur time.... :) < |
Edited by - phoenixtaz13 on 28 February 2009 00:29:20 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 28 February 2009 : 03:16:42
|
quote: inside my inc_site_left1.asp i replaced...
That's the first problem.... You cannot use "includes" within an include that is called from a page which already uses those files. I wrote this as a stand-alone example page. You'll discover that if you simply call this from the address bar, it'll work properly.
To rectify the problems; you must make sure that any required file which is NOT included (on the page which calls your left-side script) is contained here. The rest of the includes (the duplicates) should be removed. So your actions in problems 1-3 were correct.
quote:
4th problem error message:
ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/forum/Default.asp, line 111
This problem isn't referring to an error with the code I wrote for "inc_site_left.asp" but with "default.asp", and that's why your fix didn't have any effect. You may want to review the code in "default.asp" immediately prior to line 111.< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 28 February 2009 : 03:36:32
|
|
|
|
phoenixtaz13
Junior Member
129 Posts |
Posted - 28 February 2009 : 05:32:54
|
hello carefree..... :)
i'll give the new code a try.... thanks.... :)
btw, i've notice, here in snitz at the very bottom, i see this "This page was generated in 0.11 seconds." how can i activate mine?... or its a mod?... if yes, where can i download it?...
thanks for ur time.... ur the greatest!.... :) < |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 28 February 2009 : 08:01:41
|
Its at the bottom of "Feature Configuration" in your Admin Options. Set "Show Timer" to "On" |
|
|
phoenixtaz13
Junior Member
129 Posts |
Posted - 01 March 2009 : 03:08:10
|
thanks carefree... no more probs... many, many thanks.... :)
thanks anonjr, activated it already... :)
|
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 01 March 2009 : 05:03:18
|
You're welcome. |
|
|
|
Topic |
|