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
 Portal Mod and Article Body prob
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

StephenD
Senior Member

Australia
1044 Posts

Posted - 02 May 2005 :  03:55:00  Show Profile  Send StephenD a Yahoo! Message
This issue is still unresolved. Anyone know what could strip out the cont_body data from the query when editing an article?
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 03 May 2005 :  04:00:50  Show Profile  Send StephenD a Yahoo! Message
Alright! read somewhere about issues with SQL 2000 having issues with text fields if they are not placed at the end of a query string. I fiddled around and managed to get my admin_cms_content.asp page showing the correct fields and all data - author, body.

Now, when I submit I get an error because the queries don't line up properly. I am so close now to fixing this, can someone please help me realign the fields so that the edit and add functions work. Here is a link to the text version of my file. admin_cms_content
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 03 May 2005 :  20:19:12  Show Profile  Send StephenD a Yahoo! Message
Finally got it working by rearranging the queries so that the cont_body text field was last in string. Here are the changes I made;

Line 18
	dim dDate, sTitle, sSummary, lAuthorID, sBody


Lines 38 - 43

			sTitle		= ChkString(Request.Form("Title"),"SQLString")
			sSummary	= ChkString(Request.Form("Summary"),"message")
			lAuthorID	= Request.Form("AuthID")
			lCategoryID	= Request.Form("CatID")
			sBody		= ChkString(Request.Form("Message"),"message")
			dDate		= DateToStr(strForumTimeAdjust)

Lines 66-72
					strSql = "UPDATE " & strTablePrefix & "CMS_CONTENT SET "
					strSql = strSql & "CAT_ID = " & lCategoryID
					strSql = strSql & ", CONT_TITLE = '" & sTitle & "'"
					strSql = strSql & ", CONT_SUMMARY = '" & sSummary & "'"
					strSql = strSql & ", CONT_LAST_EDIT = '" & dDate & "' "
					strSql = strSql & ", CONT_AUTHOR = '" & lAuthorID & "' "
					strSql = strSql & ", CONT_BODY = '" & sBody & "' "
					strSql = strSql & "WHERE " & strTablePrefix & "CMS_CONTENT.CONT_ID = " & lContentID	

Lines 91-99
					strSql = "INSERT INTO " & strTablePrefix & "CMS_CONTENT (CAT_ID"
					strSql = strSql & ", CONT_TITLE"
					strSql = strSql & ", CONT_SUMMARY"
					strSql = strSql & ", CONT_POSTEDBY"
					strSql = strSql & ", CONT_AUTHOR"
					strSql = strSql & ", CONT_DATE"
					strSql = strSql & ", CONT_BODY"
					strSql = strSql & ", CONT_LAST_EDIT"					
					strSql = strSql & ", CONT_STATUS"
					strSql = strSql & ") VALUES ("
					strSql = strSql & "" & lCategoryID
					strSql = strSql & ", '" & sTitle & "'"
					strSql = strSql & ", '" & sSummary & "'"
					strSql = strSql & ", " & MemberID
					strSql = strSql & ", " & lAuthorID
					strSql = strSql & ", '" & dDate & "'"
					strSql = strSql & ", '" & sBody & "'"
					strSql = strSql & ", '" & dDate & "'"					
					strSql = strSql & ", 1)"		

Lines 153-172
			strSql = "SELECT "
			strSql = strSql & strTablePrefix & "CMS_CONTENT.CONT_ID, " 
			strSql = strSql & strTablePrefix & "CMS_CONTENT.CAT_ID, " 
strSql = strSql & strTablePrefix & "CMS_CONTENT.CONT_DATE, " 			
strSql = strSql & strTablePrefix & "CMS_CONTENT.CONT_TITLE, "

			strSql = strSql & strTablePrefix & "CMS_CONTENT.CONT_AUTHOR, " 
			strSql = strSql & strTablePrefix & "CMS_CONTENT.CONT_LAST_EDIT, "
			strSql = strSql & strTablePrefix & "CMS_CONTENT.CONT_SUMMARY, "
			strSql = strSql & strTablePrefix & "CMS_CONTENT.CONT_BODY "
			strSql = strSql & "FROM " & strTablePrefix & "CMS_CONTENT "
			strSql = strSql & "WHERE " & strTablePrefix & "CMS_CONTENT.CONT_ID = "& lContentID
				
			set rsContent = my_Conn.Execute(strSql)
			
			sTitle		= rsContent.Fields("CONT_TITLE").Value
			sSummary	= rsContent.Fields("CONT_SUMMARY").Value
			lAuthorID	= rsContent.Fields("CONT_AUTHOR").Value
			sBody		= rsContent.Fields("CONT_BODY").Value
			lCategoryID = rsContent.Fields("CAT_ID").Value
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous 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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07