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
 Hall of Fame: pop_fame.asp
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

richfed
Average Member

United States
999 Posts

Posted - 30 June 2010 :  12:11:37  Show Profile  Visit richfed's Homepage
Installed - I think correctly. In testing, I attempted to use the MOD: clicked on the HF icon and that brought up a small window where I was to enter a description. I did and upon clicking on the Hall of Fame Button on that screen, received this error:

Microsoft OLE DB Provider for SQL Server error '80040e37'

Invalid object name 'FORUM_HALL_OF_FAME'.

/messageboard/pop_fame.asp, line 64



I am using Snitz .05, not .06 - could that be it?

Edited by - richfed on 30 June 2010 12:14:23

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 30 June 2010 :  14:50:28  Show Profile
Sounds like you failed to first run the "hall_of_fame.asp" file while logged on as administrator. It creates the necessary table, etc.
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 30 June 2010 :  14:56:36  Show Profile  Visit richfed's Homepage
Correct ... I missed that ...

After running, the error is:

Microsoft OLE DB Provider for SQL Server error '80040e14'
Column or parameter #1: Cannot find data type AUTOINCREMENT.

/messageboard/hall_of_fame.asp, line 140

Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 30 June 2010 :  15:30:35  Show Profile
Missed the Sql Server statement. In Sql, autoincrement requires an underline (thus: auto_increment). Change line 139 to say:

		strSql="CREATE TABLE " & strTablePrefix & "HALL_OF_FAME ( HF_ITEM AUTO_INCREMENT, HF_MEMBER_ID INT NOT NULL, HF_MEMBER_NAME VARCHAR(75), HF_SUBJECT VARCHAR(255) NOT NULL, HF_DATE VARCHAR(14) NOT NULL, HF_DESCRIPTION MEMO NOT NULL, HF_TOPIC_ID INT NOT NULL, HF_REPLY_ID INT )"
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 30 June 2010 :  18:56:37  Show Profile  Visit richfed's Homepage
Same error, Carefree. I made the change, ran the file again ... no progress.

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 01 July 2010 :  04:44:28  Show Profile
If you changed "autoincrement" to "auto_increment", an error should show "Cannot find data type AUTO_INCREMENT."

That said, you should be able to use the "identity" command like this:

		strSql="CREATE TABLE " & strTablePrefix & "HALL_OF_FAME ( HF_ITEM IDENTITY(1,1), HF_MEMBER_ID INT NOT NULL, HF_MEMBER_NAME VARCHAR(75), HF_SUBJECT VARCHAR(255) NOT NULL, HF_DATE VARCHAR(14) NOT NULL, HF_DESCRIPTION MEMO NOT NULL, HF_TOPIC_ID INT NOT NULL, HF_REPLY_ID INT )"

Edited by - Carefree on 01 July 2010 04:44:59
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 01 July 2010 :  08:53:21  Show Profile  Visit richfed's Homepage
Yes, it did, Carefree ... the underscore was there in the new error message.

I am lost with this know. I just used that latest bit at Line 139. Is that what you meant to do? In any event, doing that created this error:

Microsoft OLE DB Provider for SQL Server error '80040e14'
The definition for column 'HF_ITEM' must include a data type.

/messageboard/hall_of_fame.asp, line 140


Here is a text file of my Hall of Fame file as it stands now.

Thanks for assisting me in this.
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 01 July 2010 :  09:29:05  Show Profile
Well, this should do it. If not, we'll have to use a dbs file.


<%
'###############################################################################
'##
'##                                    Snitz Forums 2000 v3.4.06
'##
'###############################################################################
'##
'## Copyright © 2000-06 Michael Anderson, Pierre Gorissen,
'##                                    Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output.  The "powered by" text/logo with a
'## link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful but
'## WITHOUT ANY WARRANTY; without even an implied warranty of MERCHANTABILITY
'## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
'## for more details.
'##
'## You should have received a copy of the GNU General Public License along
'## with this program; if not, write to:
'##
'##              Free Software Foundation, Inc.
'##              59 Temple Place, Suite 330
'##              Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'##              http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'##              manderson@snitz.com
'##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp"-->
<!--#INCLUDE FILE="inc_func_member.asp"-->
<!--#INCLUDE FILE="inc_func_secure.asp"-->
<%
if mLev > 2 and (cLng(Request.QueryString("del"))>0) then
   strSql="DELETE FROM " & strTablePrefix & "HALL_OF_FAME WHERE HF_ITEM="& cLng(Request.QueryString("del"))
   my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
Response.Write "<table bgcolor=""" & strPageBgColor & """ border=""0"" width=""100%"">" & vbNewLine & _
   "  <tr>" & vbNewLine & _
   "     <td width=""33%"" align=""left"" nowrap>" & vbNewLine & _
   "        <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
   "        " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " " & vbNewLine & _
   "           <a href=""default.asp"">All Forums" & vbNewLine & _
   "           </a><br />" & vbNewLine & _
   "        " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""") & " Hall of Fame<br />" & vbNewLine & _
   "        </font>" & vbNewLine & _
   "     </td>" & vbNewLine & _
   "  </tr>" & vbNewLine & _
   "</table>" & vbNewLine & _
   "<br />" & vbNewLine & _
   "<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
   "  <tr>" & vbNewLine & _
   "     <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
   "        <table align=""center"" border=""1"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
   "           <tr>" & vbNewLine & _
   "              <td align=""center"" bgcolor=""" & strHeadCellColor & """ colspan=""5"">" & vbNewLine & _
   "                 <font face=""" & strHeadFontFace & """ size=""" & strHeadFontSize & """ color=""" & strHeadFontColor & """><b>Hall of Fame</b>" & vbNewLine & _
   "                 </font>" & vbNewLine & _
   "              </td>" & vbNewLine & _
   "           </tr>" & vbNewLine & _
   "           <tr valign=""middle"">" & vbNewLine & _
   "              <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
   "                 <td width=""5%"" bgcolor=""" & strCategoryCellColor & """ valign=""top"">Nominator" & vbNewLine & _
   "                 </td>" & vbNewLine & _
   "                 <td width=""15%"" bgcolor=""" & strCategoryCellColor & """ valign=""top"">Subject" & vbNewLine & _
   "                 </td>" & vbNewLine & _
   "                 <td width=""20%"" bgcolor=""" & strCategoryCellColor & """ valign=""top"">Date" & vbNewLine & _
   "                 </td>" & vbNewLine & _
   "                 <td width=""55%"" bgcolor=""" & strCategoryCellColor & """ valign=""top"">Description" & vbNewLine & _
   "                 </td>" & vbNewLine & _
   "                 <td width=""5%"" bgcolor=""" & strCategoryCellColor & """ valign=""top"">" & vbNewLine
if mLev > 2 then
   Response.Write "Admin"
else
   Response.Write " "
end if
Response.Write "                 </td>" & vbNewLine & _
   "              </font>" & vbNewLine & _
   "           </tr>" & vbNewLine & _
   "           <font face=""" & strFooterFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine
set my_ActiveConn = Server.CreateObject("ADOX.Catalog")
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open(strConnString)
my_ActiveConn.ActiveConnection = my_Conn
Found=0
for each table in my_ActiveConn.tables
   if lcase(table.name)=lcase(strTablePrefix & "HALL_OF_FAME") then
      Found=1
      exit for
   end if
next
if Found then
   set my_ActiveConn=Nothing
   strSql = "SELECT * FROM " & strTablePrefix & "HALL_OF_FAME"
   set rsTable=my_Conn.Execute(strSql)
   if not rsTable.EOF then
      rsTable.Close
      strSql = "SELECT HF_ITEM, HF_MEMBER_ID, HF_MEMBER_NAME, HF_SUBJECT, HF_DATE, HF_DESCRIPTION, HF_TOPIC_ID, HF_REPLY_ID FROM " & strTablePrefix & "HALL_OF_FAME  ORDER BY HF_DATE DESC"
      set rsTable=my_Conn.Execute(strSql)
      rsTable.MoveFirst
      do until rsTable.EOF
         Response.Write "           <tr valign=""middle"">" & vbNewLine & _
            "              <td width=""5%"" bgcolor=""" & strForumCellColor & """ valign=""top""><a href=""pop_profile.asp?mode=display&id=" & rsTable("HF_MEMBER_ID")&""">" & rsTable("HF_Member_Name") & "</a>" & vbNewLine & _
            "              </td>" & vbNewLine & _
            "              <td width=""15%"" bgcolor=""" & strForumCellColor & """ valign=""top""><a href=""topic.asp?whichpage=-1&topic_id="&rsTable("HF_TOPIC_ID")&"&reply_id="&rsTable("HF_REPLY_ID")&""">" & rsTable("HF_SUBJECT") & "</a>" & vbNewLine & _
            "              </td>" & vbNewLine & _
            "              <td width=""20%"" bgcolor=""" & strForumCellColor & """ valign=""top"">" & strtodate(rsTable("HF_DATE")) & "" & vbNewLine & _
            "              </td>" & vbNewLine & _
            "              <td width=""55%"" bgcolor=""" & strForumCellColor & """ valign=""top"">" & rsTable("HF_DESCRIPTION") & "" & vbNewLine & _
            "              </td>" & vbNewLine & _
            "              <td align=""center"" width=""5%"" bgcolor=""" & strForumCellColor & """ valign=""top"">" & vbNewLine
         if mLev > 2 then
            Response.Write "<a href=""hall_of_fame.asp?del="& rsTable("HF_ITEM")&""">" & getCurrentIcon("" & striconDeleteReply & "","Delete Entry", "align=""middle""") & "</a>" & vbNewLine
         else
            Response.Write " "
         end if
         Response.Write "              </td>" & vbNewLine & _
            "           </tr>" & vbNewLine
         rsTable.MoveNext
      Loop
   end if
else
   if mLev > 2 then
      set my_ActiveConn=Nothing
      if strDBType="access" then
      	strSql="CREATE TABLE " & strTablePrefix & "HALL_OF_FAME ( HF_ITEM AUTOINCREMENT, HF_MEMBER_ID INT NOT NULL, HF_MEMBER_NAME VARCHAR(75), HF_SUBJECT VARCHAR(255) NOT NULL, HF_DATE VARCHAR(14) NOT NULL, HF_DESCRIPTION MEMO NOT NULL, HF_TOPIC_ID INT NOT NULL, HF_REPLY_ID INT )"
      else
      	strSql="CREATE TABLE " & strTablePrefix & "HALL_OF_FAME ( HF_ITEM IDENTITY, HF_MEMBER_ID INT NOT NULL, HF_MEMBER_NAME VARCHAR(75), HF_SUBJECT VARCHAR(255) NOT NULL, HF_DATE VARCHAR(14) NOT NULL, HF_DESCRIPTION MEMO NOT NULL, HF_TOPIC_ID INT NOT NULL, HF_REPLY_ID INT )"
      end if
      my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
      Response.Write "<tr><td colspan=""5"">Database table created successfully.</td></tr>"
   else
      Response.Write "Insufficient privileges to create database table."
   end if
end if
Response.Write "           </font>" & vbNewLine & _
   "        </table>" & vbNewLine & _
   "     </td>" & vbNewLine & _
   "  </tr>" & vbNewLine & _
   "</table>" & vbNewLine
WriteFooter
%>
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 01 July 2010 :  09:49:58  Show Profile  Visit richfed's Homepage
Nope.

Microsoft OLE DB Provider for SQL Server error '80040e14'
The definition for column 'HF_ITEM' must include a data type.

/messageboard/hall_of_fame.asp, line 144


Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 01 July 2010 :  11:16:09  Show Profile
OK, dbs file it is. Save the following as "dbs_fame.asp" in your forum directory, run it from administrative console (mods).


 Hall of Fame 1.0

[DROP]
HALL_OF_FAME
[END]

[CREATE]
HALL_OF_FAME
HF_ITEM#INT#IDENTITY (1,1)# 
HF_MEMBER_ID#INT##
HF_MEMBER_NAME#VARCHAR(75)#NOT NULL#
HF_SUBJECT#VARCHAR(255)#NOT NULL#
HF_DATE#VARCHAR(14)NOT NULL##
HF_DESCRIPTION#MEMO#NOT NULL#
HF_TOPIC_ID#INT#NOT NULL#
HF_REPLY_ID#INT#NOT NULL#
[END]

Edited by - Carefree on 01 July 2010 12:09:39
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 01 July 2010 :  11:32:41  Show Profile  Visit richfed's Homepage
Jeez --- running it says that the table already exist!


Hall of Fame 1.0

Dropping Table..

Table does not exist
--------------------------------------------------------------------------------

Creating table(s)...
CREATE TABLE FORUM_HALL_OF_FAME#INT#IDENTITY (1,1)#( HF_ITEM int IDENTITY (1, 1) PRIMARY KEY NOT NULL , HF_MEMBER_ID int NOT NULL , HF_MEMBER_NAME nvarchar(75) NOT NULL , HF_SUBJECT nvarchar(255) NOT NULL , HF_DATE nvarchar(14)not null NOT NULL , HF_DESCRIPTION ntext NOT NULL , HF_TOPIC_ID int NOT NULL , HF_REPLY_ID int NOT NULL )
Table already exists

--------------------------------------------------------------------------------


Database setup finished


I tried to place a post into the Hall of Fame anyway, but got the very same error I received in my first post.

Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 01 July 2010 :  11:34:06  Show Profile  Visit richfed's Homepage
Is this how pop_fame.asp is supposed to look in your browser?

Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 01 July 2010 :  12:11:05  Show Profile
quote:
Originally posted by richfed

Jeez --- running it says that the table already exist!


Sorry, cursor jumped when I cut/pasted and it was corrupt. I fixed it above.
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 01 July 2010 :  12:25:02  Show Profile  Visit richfed's Homepage
I get exactly the same errors on this, Carefree ... For some reason, it doesn't work on my forum.

How should pop_fame be reading right now?
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 01 July 2010 :  16:55:46  Show Profile
Copy/paste the error please, it should not be the same.

"pop_fame.asp"
<%
'###############################################################################
'##
'##         							Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-09 Michael Anderson, Pierre Gorissen,
'##         							Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output.  The "powered by" text/logo with a
'## link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful but
'## WITHOUT ANY WARRANTY; without even an implied warranty of MERCHANTABILITY
'## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
'## for more details.
'##
'## You should have received a copy of the GNU General Public License along
'## with this program; if not, write to:
'##
'##		        Free Software Foundation, Inc.
'##		        59 Temple Place, Suite 330
'##		        Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'## 		        http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'## 		        manderson@snitz.com
'##
'###############################################################################
ThemeID=3
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header_short.asp"-->
<!--#INCLUDE FILE="inc_func_member.asp"-->
<!--#INCLUDE FILE="inc_func_secure.asp"-->
<%
if mLev > 1 and (Request.Form("Method_Type")="Addon") then
	if Request.Form("Description")="" then
		Response.Write	"Description cannot be blank." & vbNewLine & _
			"      <a href=""JavaScript:history.go(-1)"">Go Back to Correct Data</a></font></p>" & vbNewLine
	else
		Topic_ID=Request.Form("topic_id")
		Reply_ID=Request.Form("reply_id")
		strSql="SELECT T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID="&Topic_ID
		set rsSubject=my_Conn.Execute(strSql)
		Topic_Subject=rsSubject("T_SUBJECT")
		rsSubject.Close
		set rsSubject=Nothing
		Description=Request.Form("Description")
		if Reply_ID="" then Reply_ID=0
		strSql="INSERT INTO " & strTablePrefix & "HALL_OF_FAME (HF_MEMBER_ID, HF_MEMBER_NAME, HF_SUBJECT, HF_DATE, HF_DESCRIPTION, HF_TOPIC_ID, HF_REPLY_ID) VALUES (" & MEMBERID & ", '" & strDBNTUserName & "', '" & TOPIC_SUBJECT & "', " & DateToStr(strForumTimeAdjust) & ", '" & Description & "', " & Topic_ID & ", " & Reply_ID & ")"
		my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
	end if
end if
Response.Write	"<form name=""FAME"" method=""post"" action=""pop_fame.asp"">" & vbNewLine & _
	"<input type=""hidden"" name=""Method_Type"" value=""Addon"">" & vbNewLine & _
	"<input type=""hidden"" name=""topic_id"" value=" & Request.QueryString("Topic_ID") & ">" & vbNewLine & _
	"<input type=""hidden"" name=""reply_id"" value=" & Request.QueryString("Reply_ID") & ">" & vbNewLine & _
	"<table border=""1"" width=""150"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
	"	<tr>" & vbNewLine & _
	"		<td width=""50"" bgcolor=""" & strCategoryCellColor & """ valign=""top"">" & vbNewLine & _
	"			<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>Description" & vbNewLine & _
	"			</font>" & vbNewLine & _
	"		</td>" & vbNewLine & _
	"		<td width=""100"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
	"			<font face=""" & strForumFontFace & """ size=""" & strForumFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
	"				<textarea name=""Description"" cols=""50"" rows=""5""></textarea>" & vbNewLine & _
	"			</font>" & vbNewLine & _
	"		</td>" & vbNewLine & _
	"	</tr>" & vbNewLine & _
	"</table>" & vbNewLine & _
	"<center><input type=""submit"" value=""Hall of Fame""></center>" & vbNewLine & _
	"</form>" & vbNewLine
WriteFooterShort
%>
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 01 July 2010 :  17:48:29  Show Profile  Visit richfed's Homepage
Alright ... I redid pop_fame and the dbs file to what you have just currently posted. Ran the dbs file again.

Here is the message after running the database upgrade:


Hall of Fame 1.0

Dropping Table..

Table does not exist
--------------------------------------------------------------------------------

Creating table(s)...
CREATE TABLE FORUM_HALL_OF_FAME( HF_ITEM#INT#IDENTITY (1,1)# int IDENTITY (1, 1) PRIMARY KEY NOT NULL , HF_MEMBER_ID int NOT NULL , HF_MEMBER_NAME nvarchar(75) NOT NULL , HF_SUBJECT nvarchar(255) NOT NULL , HF_DATE nvarchar(14)not null NOT NULL , HF_DESCRIPTION ntext NOT NULL , HF_TOPIC_ID int NOT NULL , HF_REPLY_ID int NOT NULL )
Table already exists

--------------------------------------------------------------------------------


Database setup finished


I then went to a thread and clicked on the "HF" icon. That brought up a window that looks similar, but not exactly like the image I posted above. The cell to the right is not there this time ... just the 2 that say "Description" and the input cell with the "Hall of Fame" button below it.

----> Question: How can I change the background color in the left most field to that in the now gone [thankfully] right-most field?

After clicking on the "Hall of Fame" button, I get this error:

Microsoft OLE DB Provider for SQL Server error '80040e14'

Line 1: Incorrect syntax near 's'.

/messageboard/pop_fame.asp, line 64


----> Question: Am I doing something incorrectly, or is it the MOD?

Thanks for your patience, Carefree!!
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.53 seconds. Powered By: Snitz Forums 2000 Version 3.4.07