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
 Problem adding forum to existing category
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redding43
Starting Member

13 Posts

Posted - 11 January 2008 :  14:07:46  Show Profile
I am getting the error below when I add a new Forum within an existing category (that has worked in the past for other Forums added within it)

This appears to have happened since upgrade to latest version of Snitz and adding a number of Mods.

Have searched and the only result I get for the same problem pointed to the calendar MOD and changed some code to fix it. This is not the problem with mine.

Could someone tell me how and where I can amend the code to try and understand the problem a little more by seeing a the system error

'There has been a problem!

There was an error = Number of query values and destination fields are not the same.'


Thanks

cripto9t
Average Member

USA
881 Posts

Posted - 11 January 2008 :  14:49:46  Show Profile
In post_info.asp find this code. The values and the fields are uneven ie More on
one side of strSql = strSql & ") VALUE (" than the other
	if Err_Msg = "" then
		'## Forum_SQL - Do DB Update
		strSql = "INSERT INTO " & strTablePrefix & "FORUM "
		strSql = strSql & "(CAT_ID"
		strSql = strSql & ", F_STATUS"
		if strPrivateForums = "1" then
			strSql = strSql & ", F_PRIVATEFORUMS"
			if Request.Form("AuthPassword") <> " " then
				strSql = strSql & ", F_PASSWORD_NEW"
			end if
		end if
		'strSql = strSql & ", F_LAST_POST"
		strSql = strSql & ", F_SUBJECT"
		strSql = strSql & ", F_DESCRIPTION"
		strSql = strSql & ", F_TYPE" 
		strSql = strSql & ", F_L_ARCHIVE "
		strSql = strSql & ", F_ARCHIVE_SCHED "
		strSql = strSql & ", F_L_DELETE "
		strSql = strSql & ", F_DELETE_SCHED "
	        strSql = strSql & ", F_SUBSCRIPTION"
	      	strSql = strSql & ", F_MODERATION"
		strSql = strSql & ", F_ORDER "
		strSql = strSql & ", F_DEFAULTDAYS "
		strSql = strSql & ", F_COUNT_M_POSTS "
		strSql = strSql & ") VALUES ("
		strSql = strSql & Cat_ID
		strSql = strSql & ", 1 "
		if strPrivateForums = "1" then
			strSql = strSql & ", " & Request.Form("AuthType") & ""
			if Request.Form("AuthPassword") <> " " then
				strSql = strSql & ", '" & ChkString(Request.Form("AuthPassword"),"SQLString") & "'"
			end if
		end if
		'strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'"
		strSql = strSql & ", '" & txtSubject & "'"
		strSql = strSql & ", '" & txtMessage & "'"
		strSql = strSql & ", 0"
		strSql = strSql & ", '' "
		strSql = strSql & ", 30 "
		strSql = strSql & ", '' "
		strSql = strSql & ", 365 "
	        ' DEM --> Start of Code added for moderation and subscription
	        if strSubscription > 0 and CatSubscription > 0 and strEmail = "1" then
	                strSql = strSql & ", " & fSubscription
	        else
	                strSql = strSql & ", 0"
	        end if
	        if strModeration = 1 and CatModeration = 1 then
	                strSql = strSql & ", " & ChkString(Request.Form("Moderation"), "SQLString")
	        else
	                strSql = strSql & ", 0"
	        end if
	        ' DEM --> End of Code added for moderation and subscription
		strSql = strSql & ", 1 "
		strSql = strSql & ", " & ChkString(Request.Form("DefaultDays"), "SQLString")
		strSql = strSql & ", " & ChkString(Request.Form("ForumCntMPosts"), "SQLString")
	        strSql = strSql & ")"

		my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords

    _-/Cripto9t\-_
Go to Top of Page

redding43
Starting Member

13 Posts

Posted - 11 January 2008 :  16:00:24  Show Profile
Thanks for the fast response...you will need to pardon my lack of knowledge on this

Below is the code from my site, what am I looking for exactly?

if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "INSERT INTO " & strTablePrefix & "FORUM "
strSql = strSql & "(CAT_ID"
strSql = strSql & ", F_STATUS"
if strPrivateForums = "1" then
strSql = strSql & ", F_PRIVATEFORUMS"
if Request.Form("AuthPassword") <> " " then
strSql = strSql & ", F_PASSWORD_NEW"
end if
end if
'strSql = strSql & ", F_LAST_POST"
strSql = strSql & ", F_SUBJECT"
strSql = strSql & ", F_DESCRIPTION"
strSql = strSql & ", F_TYPE"
strSql = strSql & ", F_L_ARCHIVE "
strSql = strSql & ", F_ARCHIVE_SCHED "
strSql = strSql & ", F_L_DELETE "
strSql = strSql & ", F_DELETE_SCHED "
strSql = strSql & ", F_SUBSCRIPTION"
strSql = strSql & ", F_MODERATION"
strSql = strSql & ", F_ORDER "
'################ Poll Mod ##################
if Request.Form("PollAuth") <> "" then
strSql = strSql & ", " & chkString(Request.Form("PollAuth"),"SQLString")
else
strSql = strSql & ", 0 "
end if
'############################################

strSql = strSql & ", F_DEFAULTDAYS "
strSql = strSql & ", F_COUNT_M_POSTS "
strSql = strSql & ", F_ALLOWEVENTS "
strSql = strSql & ") VALUES ("
strSql = strSql & Cat_ID
strSql = strSql & ", 1 "
if strPrivateForums = "1" then
strSql = strSql & ", " & Request.Form("AuthType") & ""
if Request.Form("AuthPassword") <> " " then
strSql = strSql & ", '" & ChkString(Request.Form("AuthPassword"),"SQLString") & "'"
end if
end if
'strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", '" & txtSubject & "'"
strSql = strSql & ", '" & txtMessage & "'"
strSql = strSql & ", 0"
strSql = strSql & ", '' "
strSql = strSql & ", 30 "
strSql = strSql & ", '' "
strSql = strSql & ", 365 "
' DEM --> Start of Code added for moderation and subscription
if strSubscription > 0 and CatSubscription > 0 and strEmail = "1" then
strSql = strSql & ", " & fSubscription
else
strSql = strSql & ", 0"
end if
if strModeration = 1 and CatModeration = 1 then
strSql = strSql & ", " & ChkString(Request.Form("Moderation"), "SQLString")
else
strSql = strSql & ", 0"
end if
' DEM --> End of Code added for moderation and subscription
strSql = strSql & ", 1 "
strSql = strSql & ", " & ChkString(Request.Form("DefaultDays"), "SQLString")
strSql = strSql & ", " & ChkString(Request.Form("ForumCntMPosts"), "SQLString")
If CLng(Request.Form("allowevents")) = 1 then StrSql = strSql & ", 1" Else strSql = strSql & ", 0"


strSql = strSql & ")"

my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 11 January 2008 :  17:29:00  Show Profile
Your missing some code for the poll mod. I don't have a copy handy.
		strSql = strSql & ", 1 "
		strSql = strSql & ", " & ChkString(Request.Form("DefaultDays"), "SQLString")
There should be some poll mod code in between those 2 lines

    _-/Cripto9t\-_
Go to Top of Page

redding43
Starting Member

13 Posts

Posted - 12 January 2008 :  14:06:08  Show Profile
Thanks cripto9t. I also had another bit of code missing from the Poll Mod. Looks like all working now

Appreciate your time
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.44 seconds. Powered By: Snitz Forums 2000 Version 3.4.07