Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forum Error - NO REASON! Help!!!! 1

Status
Not open for further replies.

Ladyborg

Programmer
May 11, 2002
208
US
I'm using DUForum Pro on a web site. One forum is working fine with the same exact code as you see below, only the connection string changed as it is a different database. I get an error on line 56 which is the last line of code below [cmdPost.Execute()] - the error I get is at the end of this posting.

<!--#include file=&quot;../includes/inc_config.asp&quot; -->
<!--#include file=&quot;../../../Connections/cnpublic.asp&quot; -->
<% If Request.Form(&quot;SUBMIT&quot;) = &quot;POST&quot; then 'submit = post ----> codes for posting a new message %>
<%

if(Request.Form(&quot;FOR_ID&quot;) <> &quot;&quot;) then cmdPost__for_id = Request.Form(&quot;FOR_ID&quot;)

if(Request.Form(&quot;MSG_INFORMED&quot;) <> &quot;&quot;) then cmdPost__msg_informed = Request.Form(&quot;MSG_INFORMED&quot;)

if(Request.Cookies(&quot;CookieUser&quot;) <> &quot;&quot;) then cmdPost__msg_author = Request.Cookies(&quot;CookieUser&quot;)

if(Request.Form(&quot;MSG_SUBJECT&quot;) <> &quot;&quot;) then cmdPost__msg_subject = Request.Form(&quot;MSG_SUBJECT&quot;)

if(Request.Form(&quot;MSG_BODY&quot;) <> &quot;&quot;) then cmdPost__msg_body = Request.Form(&quot;MSG_BODY&quot;)

%>
<%
Dim rsMailed__MMColParam
rsMailed__MMColParam = &quot;True&quot;
if (Request(&quot;MM_EmptyValue&quot;) <> &quot;&quot;) then rsMailed__MMColParam = Request(&quot;MM_EmptyValue&quot;)
%>
<%
set rsMailed = Server.CreateObject(&quot;ADODB.Recordset&quot;)
rsMailed.ActiveConnection = MM_cnpublic_STRING
rsMailed.Source = &quot;SELECT U_EMAIL, U_FIRST FROM USERS, PROFILES WHERE U_NAME = U_ID AND U_MAILED = &quot; + Replace(rsMailed__MMColParam, &quot;'&quot;, &quot;''&quot;) + &quot;&quot;
rsMailed.CursorType = 0
rsMailed.CursorLocation = 2
rsMailed.LockType = 3
rsMailed.Open()
rsMailed_numRows = 0
%>
<%
Do While NOT rsMailed.EOF
Dim objCDO
Set objCDO = Server.CreateObject(&quot;CDONTS.NewMail&quot;)
objCDO.From = Request.Form(&quot;FOR_NAME&quot;) & &quot;Forum@&quot; & myDomain
objCDO.To = rsMailed.Fields.Item(&quot;U_EMAIL&quot;).Value
objCDO.Subject = &quot;New message posted&quot;
objCDO.Body = &quot;Hello &quot; & rsMailed.Fields.Item(&quot;U_FIRST&quot;).Value & &quot;! A new message has been posted in the &quot; & Request.Form(&quot;FOR_NAME&quot;) & &quot; forum. Please click below to go read it: &quot; & vbnewline & myURL & &quot;/forums/messages.asp?r=forums&t=&quot; & Request.Form(&quot;FOR_NAME&quot;) & &quot;&i=&quot; & Request.Form(&quot;FOR_ID&quot;)
objCDO.Send()
Set objCDO = Nothing
rsMailed.MoveNext
loop
%>
<%
rsMailed.Close()
%>
<% 'codes to insert a new topic into MESSAGES table
set cmdPost = Server.CreateObject(&quot;ADODB.Command&quot;)
cmdPost.ActiveConnection = MM_cnpublic_STRING
cmdPost.CommandText = &quot;INSERT INTO MESSAGES (&quot; + Replace(cmdPost__for_id, &quot;'&quot;, &quot;''&quot;) + &quot;, &quot; + Replace(cmdPost__msg_informed, &quot;'&quot;, &quot;''&quot;) + &quot;, &quot; + Replace(cmdPost__msg_author, &quot;'&quot;, &quot;''&quot;) + &quot;, &quot; + Replace(cmdPost__msg_subject, &quot;'&quot;, &quot;''&quot;) + &quot;, &quot; + Replace(cmdPost__msg_body, &quot;'&quot;, &quot;''&quot;) + &quot;) VALUES (&quot; + Replace(cmdPost__for_id, &quot;'&quot;, &quot;''&quot;) + &quot;, &quot; + Replace(cmdPost__msg_informed, &quot;'&quot;, &quot;''&quot;) + &quot;, '&quot; + Replace(cmdPost__msg_author, &quot;'&quot;, &quot;''&quot;) + &quot;', '&quot; + Replace(cmdPost__msg_subject, &quot;'&quot;, &quot;''&quot;) + &quot;', '&quot; + Replace(cmdPost__msg_body, &quot;'&quot;, &quot;''&quot;) + &quot;') &quot;
cmdPost.CommandType = 1
cmdPost.CommandTimeout = 0
cmdPost.Prepared = true
cmdPost.Execute()
%>



ERROR:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.


CAN ANYONE SHED LIGHT ON THIS?!?!!!!!
I'VE RACKED MY BRAIN ON IT!%-) [gorgeous] Ladyborg
&quot;Many of life's failures are people who did not realize how close they were to success when they gave up.&quot; [Thomas A. Edison]
 
Wohoooooooooooo! It Worked!!!!!!!!!!!!!!!!!!!!!!! I could just kiss you!!!!!!!!!!
kisslips.jpg



Now can you PLEASE explain what the HECK was going on?!? Remember I'm a newbie so keep it in simple terms.

ladyborg64x64.gif
Ladyborg
&quot;Many of life's failures are people who did not realize how close they were to success when they gave up.&quot; [Thomas A. Edison]
 
Well

check box's

It actually was at the end of my guessing.

Normally you insert text with ' on each side of it - denoting text, numeric you do not - well Access wants you to insert/update without ' for Yes/No

Real pain, which is why I never use them - I use text for Yes or No or 0 and 1 (my favorite) &quot;Never underestimate the power of determination&quot;

Stuart
 
and since I never use em - it was something that slipped my mind. &quot;Never underestimate the power of determination&quot;

Stuart
 
The message WAS added to the forum, but when I went to see message detail I got error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

/publicforum/includes/inc_msgDetail.asp, line 30

Line 30 is the &quot;execute&quot; line of code below. I noticed this too is a cmd. What's the glitch and how can I solve if it keeps occurring. Also, why is this happening on THIS forum, when I have another with the same exact files (only connection strings and db are changed)?

<%

set cmdMsg = Server.CreateObject(&quot;ADODB.Command&quot;)
cmdMsg.ActiveConnection = MM_cnpublic_STRING
cmdMsg.CommandText = &quot;UPDATE MESSAGES SET MSG_READ_COUNT = MSG_READ_COUNT + 1 WHERE MSG_ID = varID &quot;
cmdMsg.CommandType = 1
cmdMsg.CommandTimeout = 0
cmdMsg.Prepared = true
cmdMsg.Execute()

%>
ladyborg64x64.gif
Ladyborg
&quot;Many of life's failures are people who did not realize how close they were to success when they gave up.&quot; [Thomas A. Edison]
 
I need to see more

Like where its getting VarID &quot;Never underestimate the power of determination&quot;

Stuart
 
Lines 33 to 37 read:

<%
Dim rsMsgDetail__varID
rsMsgDetail__varID = &quot;99999999999999&quot;
if (Request.QueryString(&quot;i&quot;) <> &quot;&quot;) then rsMsgDetail__varID = Request.QueryString(&quot;i&quot;)
%>
ladyborg64x64.gif
Ladyborg
&quot;Many of life's failures are people who did not realize how close they were to success when they gave up.&quot; [Thomas A. Edison]
 
hmm, two different recordsets.

Ok, show all the code &quot;Never underestimate the power of determination&quot;

Stuart
 
Here goes, it's the whole inc_msgdetail.asp code. I hope it's not too large for the forum:


<%
Response.Buffer = &quot;true&quot;
%>
<!--#include file=&quot;../includes/inc_config.asp&quot; -->
<!--#include file=&quot;../../../Connections/cnpublic.asp&quot; -->
<%

if(Request.QueryString(&quot;t&quot;) <> &quot;&quot;) then cmdForum__varForName = Request.QueryString(&quot;t&quot;)

%>
<%

set cmdForum = Server.CreateObject(&quot;ADODB.Command&quot;)
cmdForum.ActiveConnection = MM_cnpublic_STRING
cmdForum.CommandText = &quot;UPDATE FORUMS SET FOR_READ_COUNT = FOR_READ_COUNT +1 WHERE FOR_NAME = '&quot; + Replace(cmdForum__varForName, &quot;'&quot;, &quot;''&quot;) + &quot;' &quot;
cmdForum.CommandType = 1
cmdForum.CommandTimeout = 0
cmdForum.Prepared = true
cmdForum.Execute()

%>
<%

set cmdMsg = Server.CreateObject(&quot;ADODB.Command&quot;)
cmdMsg.ActiveConnection = MM_cnpublic_STRING
cmdMsg.CommandText = &quot;UPDATE MESSAGES SET MSG_READ_COUNT = MSG_READ_COUNT + 1 WHERE MSG_ID = varID &quot;
cmdMsg.CommandType = 1
cmdMsg.CommandTimeout = 0
cmdMsg.Prepared = true
cmdMsg.Execute()

%>
<%
Dim rsMsgDetail__varID
rsMsgDetail__varID = &quot;99999999999999&quot;
if (Request.QueryString(&quot;i&quot;) <> &quot;&quot;) then rsMsgDetail__varID = Request.QueryString(&quot;i&quot;)
%>
<%
set rsMsgDetail = Server.CreateObject(&quot;ADODB.Recordset&quot;)
rsMsgDetail.ActiveConnection = MM_cnpublic_STRING
rsMsgDetail.Source = &quot;SELECT *, (SELECT COUNT(*) FROM MESSAGES WHERE MSG_AUTHOR = U_ID) AS TOPIC_COUNT, (SELECT COUNT(*) FROM REPLIES WHERE REP_AUTHOR = MSG_AUTHOR)AS REPLY_COUNT FROM MESSAGES INNER JOIN FORUMS ON FORUMS.FOR_ID = MESSAGES.FOR_ID, USERS, PROFILES WHERE U_NAME = U_ID AND U_ID = MSG_AUTHOR AND MSG_ID = &quot; + Replace(rsMsgDetail__varID, &quot;'&quot;, &quot;''&quot;) + &quot;&quot;
rsMsgDetail.CursorType = 0
rsMsgDetail.CursorLocation = 2
rsMsgDetail.LockType = 3
rsMsgDetail.Open()
rsMsgDetail_numRows = 0
%>
<%
Function TrimBody(str)
Dim Arr
Str = (Replace(str, &quot;<&quot;, &quot;&lt;&quot;))
Str = (Replace(str, &quot;>&quot;, &quot;&gt;&quot;))
Str = (Replace(str, vbCrlf, &quot;<br>&quot;))
Arr = Array(&quot;smileSimple&quot;, &quot;:)&quot;,&quot;smileSimple&quot;, &quot;:)&quot;, &quot;smileTongue&quot;, &quot;:p&quot;,&quot;smileTongue&quot;, &quot;:p&quot;, &quot;smileSad&quot;, &quot;:(&quot;,&quot;smileSad&quot;, &quot;:-(&quot;, &quot;smileWink&quot;, &quot;;)&quot;, &quot;smileWink&quot;, &quot;;-)&quot; )
for i = 0 to UBOUND(Arr)-1 step 2
Str = Replace(Str, Arr(i+1), &quot;<img src=&quot;&quot;../assets/&quot; & Arr(i) & &quot;.gif&quot;&quot; border=0>&quot;)
next
TrimBody = Str
End Function

Function DoSpace(str)
DoSpace = (Replace(str, vbCrlf, &quot;<br>&quot;))
End Function

Function DoLink(byVal strIn)
dim re, sOut

set re = New RegExp
re.global = true
re.ignorecase = true
're.multiline = true

' pattern that parses and finds any Internet URLs:
re.pattern = _
&quot;((mailto\:|(news|(ht|f)tp(s?))\://){1}\S+)&quot;

' replace method of RegExp object uses a remembered
' pattern denoted as $1 to link the found URL(s)
sOut = re.replace( strIn, _
&quot;<A HREF=&quot;&quot;$1&quot;&quot; TARGET=&quot;&quot;_new&quot;&quot;>$1</A>&quot;)

set re = Nothing
DoLink = sOut
End Function
%>

<link rel=&quot;stylesheet&quot; href=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/css/css.css&quot; type=&quot;text/css&quot;>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td align=&quot;left&quot; valign=&quot;top&quot; bgcolor=&quot;#000000&quot; colspan=&quot;2&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
</tr>
<tr>
<td align=&quot;left&quot; valign=&quot;middle&quot; height=&quot;30&quot; class=&quot;generalTextBold&quot;>
<div class = &quot;links&quot;><span class=&quot;linkColor&quot;>&nbsp;<a href=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/forums/default.asp&quot;>FORUMS</a>
&gt; <a href=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/forums/forum.asp?r=forums&t=<%= Request.QueryString(&quot;t&quot;) %>&i=<%=(rsMsgDetail.Fields.Item(&quot;FOR_ID&quot;).Value)%>%20&quot;><%= UCase( Request.QueryString(&quot;t&quot;) ) %></a>
&gt;</span><span class=&quot;generalTextRed&quot;> TOPIC VIEW</span><span class=&quot;linkColor&quot;>
</span></div>
</td>
<td align=&quot;right&quot; valign=&quot;middle&quot; height=&quot;30&quot;>
<div class = &quot;links&quot;><span class=&quot;generalText&quot;><a href=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/forums/default.asp#post&quot;>Post
A New Topic</a> | <a href=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/home/search.asp&quot;>Search</a></span>&nbsp;</div>
</td>
</tr>
<tr>
<td align=&quot;left&quot; valign=&quot;top&quot; bgcolor=&quot;#000000&quot; colspan=&quot;2&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
</tr>
<tr>
<td align=&quot;left&quot; valign=&quot;top&quot; class=&quot;bgLoginBlack&quot; height=&quot;20&quot; colspan=&quot;2&quot;>&nbsp;<img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/checkMark.gif&quot; width=&quot;16&quot; height=&quot;18&quot; align=&quot;absmiddle&quot;>&nbsp;TOPIC
DETAIL</td>
</tr>
<tr>
<td align=&quot;left&quot; valign=&quot;top&quot; bgcolor=&quot;#000000&quot; colspan=&quot;2&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
</tr>
<tr>
<td align=&quot;left&quot; valign=&quot;top&quot; colspan=&quot;2&quot;>
<div class = &quot;links&quot;>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr align=&quot;left&quot; valign=&quot;top&quot;>
<td width=&quot;130&quot;>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td align=&quot;center&quot; valign=&quot;middle&quot; height=&quot;20&quot; class=&quot;bgLogin&quot;>&nbsp;AUTHOR</td>
</tr>
<tr>
<td align=&quot;center&quot; valign=&quot;middle&quot; bgcolor=&quot;#000000&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
</tr>
<tr>
<td align=&quot;left&quot; valign=&quot;top&quot;>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;3&quot; cellpadding=&quot;2&quot;>
<tr align=&quot;left&quot; valign=&quot;middle&quot;>
<td class = &quot;generaltextbold&quot; colspan=&quot;2&quot;>
<% If rsMsgDetail.Fields.Item(&quot;U_ICON&quot;).Value <> &quot;&quot; Then %>
<img src=&quot;../assets/<%=(rsMsgDetail.Fields.Item(&quot;U_ICON&quot;).Value)%>.gif&quot; align=&quot;absmiddle&quot;>
<% Else %>
<img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/bullet.gif&quot; align=&quot;absmiddle&quot;>
<% End If %>&nbsp;&nbsp;
<a href=&quot;mailto:<%=(rsMsgDetail.Fields.Item(&quot;U_EMAIL&quot;).Value)%>&quot;><%=(rsMsgDetail.Fields.Item(&quot;MSG_AUTHOR&quot;).Value)%></a></td>
</tr>
<tr align=&quot;left&quot; valign=&quot;middle&quot;>
<td width=&quot;11&quot; align=&quot;center&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/dot.gif&quot; width=&quot;6&quot; height=&quot;6&quot; align=&quot;absmiddle&quot;></td>
<td class=&quot;generalText&quot;><%=(rsMsgDetail.Fields.Item(&quot;U_COUNTRY&quot;).Value)%></td>
</tr>
<tr align=&quot;left&quot; valign=&quot;middle&quot;>
<td width=&quot;11&quot; align=&quot;center&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/dot.gif&quot; width=&quot;6&quot; height=&quot;6&quot; align=&quot;absmiddle&quot;></td>
<td class=&quot;generalText&quot;><%=(rsMsgDetail.Fields.Item(&quot;TOPIC_COUNT&quot;).Value)%> topics</td>
</tr>
<tr align=&quot;left&quot; valign=&quot;middle&quot;>
<td width=&quot;11&quot; align=&quot;center&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/dot.gif&quot; width=&quot;6&quot; height=&quot;6&quot; align=&quot;absmiddle&quot;></td>
<td class=&quot;generalText&quot;><%=(rsMsgDetail.Fields.Item(&quot;REPLY_COUNT&quot;).Value)%> replies</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td bgcolor=&quot;#000000&quot; width=&quot;1&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
<td>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td align=&quot;left&quot; valign=&quot;middle&quot; height=&quot;20&quot; class=&quot;bgLogin&quot;>&nbsp;SUBJECT:
<%=(rsMsgDetail.Fields.Item(&quot;MSG_SUBJECT&quot;).Value)%></td>
</tr>
<tr>
<td align=&quot;center&quot; valign=&quot;middle&quot; bgcolor=&quot;#000000&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
</tr>
<tr>
<td align=&quot;center&quot; valign=&quot;top&quot;>
<table width=&quot;99%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr align=&quot;left&quot; valign=&quot;top&quot;>
<td valign=&quot;middle&quot; height=&quot;18&quot;><span class=&quot;generalTextGrey&quot;>Posted
on <%=(rsMsgDetail.Fields.Item(&quot;MSG_DATED&quot;).Value)%> with <%=(rsMsgDetail.Fields.Item(&quot;MSG_REPLY_COUNT&quot;).Value)%> replies</span></td>
<td align=&quot;right&quot; valign=&quot;middle&quot;><% If rsMsgDetail.Fields.Item(&quot;U_HOMEPAGE&quot;).Value <> &quot;&quot; Then %> <a href=&quot;<%=(rsMsgDetail.Fields.Item(&quot;U_HOMEPAGE&quot;).Value)%>&quot; target = &quot;_black&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/iconWebpage.gif&quot; alt=&quot;Website&quot; align=&quot;absmiddle&quot; border=&quot;0&quot;></a>
<% End If %>
<% If ( Request.Cookies(&quot;CookieUser&quot;) = rsMsgDetail.Fields.Item(&quot;MSG_AUTHOR&quot;).Value ) OR ( Request.Cookies(&quot;CookieUser&quot;) = myUserName ) Then %>
<a href=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/includes/editMsg.asp?r=forums&t=<%=(rsMsgDetail.Fields.Item(&quot;FOR_NAME&quot;).Value)%>&i=<%=(rsMsgDetail.Fields.Item(&quot;MSG_ID&quot;).Value)%>&quot;>
<img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/iconEdit.gif&quot; alt=&quot;Edit This Topic&quot; align=&quot;absmiddle&quot; border=&quot;0&quot;></a><% End If %><% If Request.Cookies(&quot;CookieUser&quot;) = myUserName Then %> <a href=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/includes/deleteMsg.asp?r=forums&t=<%=(rsMsgDetail.Fields.Item(&quot;FOR_NAME&quot;).Value)%>&i=<%=(rsMsgDetail.Fields.Item(&quot;FOR_ID&quot;).Value)%>&id=<%=(rsMsgDetail.Fields.Item(&quot;MSG_ID&quot;).Value)%>&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/iconDelete.gif&quot; alt=&quot;Delete This Topic&quot; align=&quot;absmiddle&quot; border=&quot;0&quot;></a>
<% End If %>
<a href=&quot;mailto:<%=(rsMsgDetail.Fields.Item(&quot;U_EMAIL&quot;).Value)%>&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/iconMail.gif&quot; alt=&quot;Email Poster&quot; align=&quot;absmiddle&quot; border=&quot;0&quot;></a>
</td>
</tr>
<tr align=&quot;left&quot; valign=&quot;top&quot; bgcolor=&quot;#000000&quot;>
<td colspan=&quot;2&quot;><img src=&quot;file:///C|/Documents%20and%20Settings/Lucy/Local%20Settings/Temp/Temporary%20Directory%2013%20for%20DUforumPro.zip/DUforum/assets/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
</tr>
<tr align=&quot;left&quot; valign=&quot;top&quot;>
<td colspan=&quot;2&quot;>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;3&quot; cellpadding=&quot;3&quot;>
<tr align=&quot;left&quot; valign=&quot;top&quot;>
<td class=&quot;generalText&quot;><%=DoLink(TrimBody(rsMsgDetail.Fields.Item(&quot;MSG_BODY&quot;).Value))%><br><BR><%=DoSpace(rsMsgDetail.Fields.Item(&quot;U_SIGNATURE&quot;).Value)%></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>

</table>
<%
rsMsgDetail.Close()
%>
ladyborg64x64.gif
Ladyborg
&quot;Many of life's failures are people who did not realize how close they were to success when they gave up.&quot; [Thomas A. Edison]
 
ok, I take it after you insert - than it takes you to this page.

On the bottom of the insert page, they should be a response.redirect line

can you find that?

&quot;Never underestimate the power of determination&quot;

Stuart
 
No such line. I did a search for it in the code and came up empty. I also searched the actual page (this is an &quot;includes&quot; page) and also found nothing.
ladyborg64x64.gif
Ladyborg
&quot;Many of life's failures are people who did not realize how close they were to success when they gave up.&quot; [Thomas A. Edison]
 
was I correct in the order of the pages?

try a search for source code of page msgAdding.asp

look for

inc_msgDetail.asp &quot;Never underestimate the power of determination&quot;

Stuart
 
Searched for inc_msgdetail.asp, nothing. However, there are 2 response.redirect lines in msgadding.asp:

Line 77:
<% Response.Redirect &quot;forum.asp?r=forums&t=&quot; & cmdPost__for_name & &quot;&i=&quot; & cmdPost__for_id %>

Line 132:
<% Response.Redirect &quot;../forums/message.asp?r=forums&t=&quot; & cmdReply__for_name & &quot;&i=&quot; & cmdReply__msg_id %>
ladyborg64x64.gif
Ladyborg
&quot;Many of life's failures are people who did not realize how close they were to success when they gave up.&quot; [Thomas A. Edison]
 
ugggh

is this up on the web I can take a look at? &quot;Never underestimate the power of determination&quot;

Stuart
 
LOL. How can you look at asp pages online? Can I send it to you in an e-mail?
ladyborg64x64.gif
Ladyborg
&quot;Many of life's failures are people who did not realize how close they were to success when they gave up.&quot; [Thomas A. Edison]
 
wanted to see the front end of it.

know what - lets try this.

on the first page - make a backup copy of that.

then your top code where you see the code we did of:


<% Dim rs
Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.open MM_cnpublic_STRING


SQLstmt = &quot;Insert into Messages(FOR_ID,MSG_AUTHOR,MSG_SUBJECT,MSG_BODY,MSG_INFORMED)&quot;
SQLstmt = SQLstmt & &quot;VALUES(&quot; & cmdPost__for_id
SQLstmt = SQLstmt & &quot;,'&quot; & Replace(cmdPost__msg_author,&quot;'&quot;,&quot;''&quot;) & &quot;'&quot;
SQLstmt = SQLstmt & &quot;,'&quot; & Replace(cmdPost__msg_subject, &quot;'&quot;, &quot;''&quot;) & &quot;'&quot;
SQLstmt = SQLstmt & &quot;,'&quot; & Replace(cmdPost__msg_body, &quot;'&quot;, &quot;''&quot;) & &quot;'&quot;
SQLstmt = SQLstmt & &quot;,&quot; & cmdPost__msg_informed & &quot;&quot;
SQLstmt = SQLstmt & &quot;)&quot;
'response.Write SQLstmt
Set RS = Conn.Execute(SQLstmt)
set rs=nothing
Conn.Close
set conn=nothing
%>



replace that with:


<% Dim rs
Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.open MM_cnpublic_STRING


SQLstmt = &quot;Insert into Messages(FOR_ID,MSG_AUTHOR,MSG_SUBJECT,MSG_BODY,MSG_INFORMED)&quot;
SQLstmt = SQLstmt & &quot;VALUES(&quot; & cmdPost__for_id
SQLstmt = SQLstmt & &quot;,'&quot; & Replace(cmdPost__msg_author,&quot;'&quot;,&quot;''&quot;) & &quot;'&quot;
SQLstmt = SQLstmt & &quot;,'&quot; & Replace(cmdPost__msg_subject, &quot;'&quot;, &quot;''&quot;) & &quot;'&quot;
SQLstmt = SQLstmt & &quot;,'&quot; & Replace(cmdPost__msg_body, &quot;'&quot;, &quot;''&quot;) & &quot;'&quot;
SQLstmt = SQLstmt & &quot;,&quot; & cmdPost__msg_informed & &quot;&quot;
SQLstmt = SQLstmt & &quot;)&quot;
'response.Write SQLstmt
Set cmdPost = Conn.Execute(SQLstmt)
%>


and at the bottom of the page put this (below the body close tags)

set cmdPost=nothing
Conn.Close
set conn=nothing
&quot;Never underestimate the power of determination&quot;

Stuart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top