Author |
Topic |
|
SPDCane
Starting Member
8 Posts |
Posted - 25 April 2002 : 11:05:55
|
Hey I recently added StickyTopic_1_0 to my board and I did all the changes that were mentioned in the readme file but now when I try to access a forum or a topic I get the following error!!!
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
/forum/forum.asp, line 255
Any ideas on what it could be?
Here is my lines 250-263
else 'end MySql specific code
set rs = Server.CreateObject("ADODB.Recordset") rs.cachesize=20
rs.open strSql, my_Conn, 3 if not (rs.EOF or rs.BOF) then rs.movefirst rs.pagesize = strPageSize maxpages = cint(rs.pagecount) rs.absolutepage = mypage end if end if
Edited by - SPDCane on 25 April 2002 11:46:59 |
|
HarlekinWF
New Member
Germany
77 Posts |
Posted - 26 April 2002 : 15:13:56
|
have same problem...
|
|
|
Traverer
New Member
Malaysia
61 Posts |
Posted - 26 April 2002 : 23:30:12
|
Could you post your forum.asp lines around 179-211 ? which should start with : quote: '## Forum_SQL - Get all topics from DB strSql ="SELECT " & strActivePrefix & "TOPICS.T_STATUS, " & strActivePrefix & "TOPICS.CAT_ID, " strSql = strSql & strActivePrefix & "TOPICS.FORUM_ID, " & strActivePrefix & "TOPICS.TOPIC_ID, " strSql = strSql & strActivePrefix & "TOPICS.T_VIEW_COUNT, " & strActivePrefix & "TOPICS.T_SUBJECT, " ...
and end with: quote: ... if strDBType = "mysql" then 'MySql specific code if mypage > 1 then intOffset = CInt((mypage-1) * strPageSize) strSql = strSql & " LIMIT " & intOffset & ", " & strPageSize & " " end if
Traverer is here. |
|
|
HarlekinWF
New Member
Germany
77 Posts |
Posted - 27 April 2002 : 07:43:48
|
'## Forum_SQL - Get all topics from DB strSql ="SELECT " & strActivePrefix & "TOPICS.T_STATUS, " & strActivePrefix & "TOPICS.CAT_ID, " strSql = strSql & strActivePrefix & "TOPICS.FORUM_ID, " & strActivePrefix & "TOPICS.TOPIC_ID, " ' ############## Poll Mod - Modified next line ############ strSql = strSql & strActivePrefix & "TOPICS.T_VIEW_COUNT, " & strActivePrefix & "TOPICS.T_SUBJECT, " & strActivePrefix & "TOPICS.T_ISPOLL, " strSql = strSql & strActivePrefix & "TOPICS.T_AUTHOR, " strSql = strSql & strActivePrefix & "TOPICS.T_REPLIES, " & strActivePrefix & "TOPICS.T_LAST_POST, " strSql = strSql & strActivePrefix & "TOPICS.T_LAST_POST_AUTHOR, " ' ############## Sticky Topic Mod ############ strSql = strSql & strActivePrefix & "TOPICS.T_STICKY, " strSql = strSql & strActivePrefix & "TOPICS.T_TOPSTICKY, " ' ############## Sticky Topic Mod ############ strSql = strSql & strMemberTablePrefix & "MEMBERS.M_NAME, " strSql = strSql & "MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " strSql = strSql & strActivePrefix & "TOPICS, " strSql = strSql & strMemberTablePrefix & "MEMBERS AS MEMBERS_1 " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strActivePrefix & "TOPICS.T_AUTHOR " strSql = strSql & " AND " & strActivePrefix & "TOPICS.T_LAST_POST_AUTHOR = MEMBERS_1.MEMBER_ID " strSql = strSql & " AND " & strActivePrefix & "TOPICS.FORUM_ID = " & Forum_ID & " " if nDays = "-1" then strSql = strSql & " AND " & strActivePrefix & "TOPICS.T_STATUS <> 0 " end if if nDays > "0" then strSql = strSql & " AND " & strActivePrefix & "TOPICS.T_LAST_POST > '" & defDate & "'" end if ' DEM --> if not a Moderator, all unapproved posts should not be viewed. if AdminAllowed = 0 then strSql = strSql & " AND ((" & strActivePrefix & "TOPICS.T_AUTHOR <> " & MemberID strSql = strSql & " AND " & strActivePrefix & "TOPICS.T_STATUS < " ' Ignore unapproved/rejected posts if Moderation = "Y" then strSql = strSql & "2" ' Ignore unapproved posts else strSql = strSql & "3" ' Ignore any hold posts end if strSql = strSql & ") OR " & strActivePrefix & "TOPICS.T_AUTHOR = " & MemberID & ")" end if
'###################### Sticky Topic Mod ############################ if request("ARCHIVE") = "true" then strSql = strSql & " ORDER BY " & strActivePrefix & "TOPICS.T_LAST_POST DESC " else strSql = strSql & " ORDER BY " & strActivePrefix & "TOPICS.T_TOPSTICKY DESC " strSql = strSql & " , " & strActivePrefix & "TOPICS.T_STICKY DESC " strSql = strSql & " , " & strActivePrefix & "TOPICS.T_LAST_POST DESC " end if '###################### Sticky Topic Mod ############################
if strDBType = "mysql" then 'MySql specific code if mypage > 1 then intOffset = CInt((mypage-1) * strPageSize) strSql = strSql & " LIMIT " & intOffset & ", " & strPageSize & " " end if
cu Harlekin
http://forum.killers-in-action.com
mIRC server : QuakeNet - Random german server channel: #killers-in-action |
|
|
Traverer
New Member
Malaysia
61 Posts |
Posted - 28 April 2002 : 11:47:04
|
I have test the Sticky Topic 1.0 myself and it works fine, even I try to copy your given forum.asp lines and paste into my forum.asp file.
Now it seems to me that the problem is not your forum.asp file but maybe some missing database fields that you might forget to update.
Try to update your database with the correct database setup file again and see what will happens next ...
Hopes that help
Traverer is here. |
|
|
|
Topic |
|
|
|