?
Solved

error '80020009'

Posted on 2003-03-05
27
Medium Priority
?
554 Views
Last Modified: 2013-12-03
while loading a asp stored page in my website i get the following error:

error '80020009'
Exception occurred.

/entry.asp, line 215

this is the source code for the page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>TEEN WRITING NET</title>
<meta http-equiv="Content-Type" content="text/css; charset=iso-8859-1">
<meta name="description" content="The newest teen writing site and contest.">
<meta name="keywords" content="keyword, keyword, keyword, keyword, keyword, keyword, keyword phrase, keyword phrase, keyword phrase, keyword phrase">
<meta name="copyright" content="2002 Teenwriting.net.  All rights reserved.  Duplication of any content on this site is prohibited.">
<meta name="design by" content="Teenwriting.net">
<meta name="robots" content="all">
<meta name="revisit-after" content="7 days">
<meta name="distribution" content="global">
<meta name="document-classification" content="General">
<meta name="rating" content="general">
<meta name="language" content="EN">

<script language="JavaScript">
function doClock(){
  var t=new Date(),a=doClock.arguments,str="",i,a1,lang="1";
  var month=new Array('January','Jan', 'February','Feb', 'March','Mar', 'April','Apr', 'May','May', 'June','Jun', 'July','Jul', 'August','Aug', 'September','Sep', 'October','Oct', 'November','Nov', 'December','Dec');
  var tday= new Array('Sunday','Sun','Monday','Mon', 'Tuesday','Tue', 'Wednesday','Wed','Thursday','Thr','Friday','Fri','Saturday','Sat');
  for(i=0;i<a.length;i++) {a1=a[i].charAt(1);switch (a[i].charAt(0)) {
  case "M":if  ((Number(a1)==3) && ((t.getMonth()+1)<10)) str+="0";
  str+=(Number(a1)>1)?t.getMonth()+1:month[t.getMonth()*2+Number(a1)];break;
  case "D": if ((Number(a1)==1) && (t.getDate()<10)) str+="0";str+=t.getDate();break;
  case "Y": str+=(a1=='0')?t.getFullYear():t.getFullYear().toString().substring(2);break;
  case "W":str+=tday[t.getDay()*2+Number(a1)];break; default: str+=unescape(a[i]);}}return str;
}
</script>


<link rel="stylesheet" href="http://www.teenwriting.net/btstyle19.css" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><FONT face=Verdana>
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolor="#a4a09f">
  <tr valign="center" align="middle">
    <td colspan="6" class="bthead" height="2">
      <div align="left"><A href="#"><FONT face=Verdana>
        <IMG height=90 alt="REPLACE WITH MEANINGFUL IMAGE DESCRIPTION" src  ="http://teenwriting.net/header.jpg" width=750 border=0 ></FONT></A></div>
    </td>
  </tr>
  <tr valign="center" align="middle">
    <td width="16%" class="btnav" height="20">
      <div align="center"><a href="http://poetry.teenwriting.net"><FONT
      face=Verdana>Poetry</FONT></a></div>
    </td>
    <td class="btnav" height="20" width="16%">
      <div align="center"><a href="http://songs.teenwriting.net"><FONT
      face=Verdana>Songs</FONT></a></div>
    </td>
    <td class="btnav" height="20" width="15%">
      <div align="center"><A href="http://stories.teenwriting.net"><FONT face=Verdana>Stories</FONT></A></div>
    </td>
    <td class="btnav" height="20" width="17%">
      <div align="center"><A href="http://essay.teenwriting.net"><FONT face=Verdana>Essay</FONT></A></div>
    </td>
    <td class="btnav" height="20" width="17%">
      <div align="center"><A href="http://fiction.teenwriting.net"><FONT face=Verdana>Fiction</FONT></A></div>
    </td>
    <td width="19%" class="btnav" height="20">
      <div align="center"><A href="http://fanfic.teenwriting.net"><FONT
  face=Verdana>Fan Fiction</FONT></A></div>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <TBODY>
  <tr>
    <td valign="top" height="514">
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr>
          <td class="btnavbk" height="98"><FONT
            face=Verdana>&nbsp;</FONT></td>
          <td class="btnavbk" valign="center" height="98">
            <table width="99%" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000" align="center">
              <tr>
                <td height="2" bgcolor="#a4a09f">
                  <div align="center"> <b><FONT face=Verdana>Current
                  News</FONT> </b></div>
                </td>
              </tr>
              <tr>
                <td class="btnavbk" valign="top" height="67">
                  <table width="100%" border="0" cellspacing="0" cellpadding="8">
                    <tr>
                      <td bgcolor="#ffffff" valign="top" height="54">
                        <p><FONT face=Verdana>Hi every one! Welcome to the new spot for teen writngs. We are still currently
                                    hard at work trying ot get this awesome and fun site up and running! Check back often cause we will
                                    be offering tons of cool things for everyone to do.  You'll be able to post your work and read and
                                    critique other teens writings and enjoy contest as well! If you have any ideas or suggestions please
                                    feel free to email us at: <A href="mailto:suggestions@teenwriting.net">suggestions</A>! Thanks again
                                    for looking. Please check back soon!
                    </FONT>  
 </p>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
     
        <table width="100%" border="0" cellspacing="0" cellpadding="8">
        <TBODY>
        <tr>
          <td valign="top" class="btnavbk" width="20%" height="433">
            <p align="center"><FONT face=Verdana><FONT>
            <TABLE borderColor=#000000 cellSpacing=0 cellPadding=8 width="100%"
            border=1>          <p align="center"><FONT face=Verdana><FONT><IMG height=1 src="images/clear.gif" width=160><br>
              <b>
              <script language="JavaScript">
   document.write(doClock("M0","%20","D0",",%20","Y0"));
</script>
              </b></FONT>
<!--#include file = "menu.xhtml"-->
            <br>
            <table width="100%" border="1" cellspacing="0" cellpadding="8" bordercolor="#000000">
              <tr>
                <td bgcolor="#ffffff" valign="top" height="254">
                  <table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="btnavbk">
                        <div align="center"><FONT
                        face=Verdana>Coming Events </FONT>  </div>
                      </td>
                    </tr>
                    <tr>
                      <td><FONT face=Verdana>We will be up and running very shortly now! We are hard at work
                                and working with local companies to bring you some really new and cool things! If you have any
                                questions or comments please <A href="mailto:suggestions@teenwriting.net">email us</A>!
                  </FONT>  
                   
                               </td>
                    </tr>
                  </table>
                 
                </td>
              </tr>
            </table>
            <p><FONT face=Verdana>
            <TABLE borderColor=#000000 cellSpacing=0 cellPadding=8 width="100%"
            border=1>
             
              <TR>
                <TD vAlign=top width=75 bgColor=#ffffff height=84>
                  <P><A href="#"><FONT
                  face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                  face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                  face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                  face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                  face=Verdana>Your Link</FONT> </A><BR></P></TD>
                <TD vAlign=top width=75 bgColor=#ffffff height=84><A
                  href="#"><FONT
                  face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                  face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                  face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                  face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                  face=Verdana>Your Link</FONT>
            </A><BR></TD></TR></TABLE></FONT></p>
          </td>
          <td valign="top" width="64%" height="433">
            <p><br><FONT
            face=Verdana>
          <p>
             <!--#include file = "header.xhtml"--><br>
            <%

If (Request("EntryID") = "") Then
 Response.Redirect("/")
 Response.End
End If
Dim varPageName
Dim varAuthorID
Dim varAnyNotes
Dim varAllowNotes
Dim varNote
Dim varDiaryType
Dim varPreviousID,varPreviousTitle
Dim varNextID,varNextTitle
Dim varFavoriteEntry
Dim varAvailable

varPageName = "Entry"
%>
<!--#include file = "security.inc"-->
<!--#include file = "ensureconnection.inc"-->
<!--#include file = "stringreplace.inc"-->
<%
Dim varEntryTitle,varAuthorDateCreated,varAliasID,varAlias,varEntry,varEntryType,varNotesType
Set comm = Server.CreateObject("ADODB.Command")
Set rs = Server.CreateObject("ADODB.Recordset")
ReDim params(1)
params(0) = int(Request("EntryID"))
params(1) = int(Session("AuthorAliasID"))
comm.ActiveConnection = "DSN=members_sql;UID=members;PWD=ecfcod3;"
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectEntry"
comm.Execute , params
rs.Open comm
If ((rs.EOF = False) And (rs.BOF = False)) Then
 varEntryTitle = rs.Fields("Title")
 varAuthorDateCreated = FormatDateTime(rs.Fields("AuthorDateCreated"),2)
 varAliasID = rs.Fields("AliasID")
 varAlias = rs.Fields("Alias")
 varDiaryType = rs.Fields("DiaryType")
 varAvailable = rs.Fields("Available")
  If (rs.Fields("EntryType") = "Private") Then
  varEntry = "<CENTER><B>-- -- -- Private Entry -- -- --</B></CENTER><BR><BR>" & Replace(rs.Fields("Entry"),vbcrlf,"<BR>")
 ElseIf (rs.Fields("EntryType") = "Friends") Then
  varEntry = "<CENTER><B>-- -- -- Friends Entry -- -- --</B></CENTER><BR><BR>" & Replace(rs.Fields("Entry"),vbcrlf,"<BR>")
 Else
  varEntry = Replace(rs.Fields("Entry"),vbcrlf,"<BR>")
 End If
 If (Session("AllowMusic") = "None") Then
  varEntry = ReplaceSens(varEntry,"<bgsound","<xxxxxxx",1)
  varEntry = ReplaceSens(varEntry,"<embed","<xxxxx",1)
 End If
 If (Session("BackgroundImages") = "None") Then
  varEntry = ReplaceSens(varEntry,"background:","xxxxxxxxxx:",1)
  varEntry = ReplaceSens(varEntry,"background=","xxxxxxxxxx=",1)
  varEntry = ReplaceSens(varEntry,"background-","xxxxxxxxxx-",1)
 End If
 If (Session("ImagesEntries") = "None") Then
  varEntry = ReplaceSens(varEntry,"<img","<xxx",1)
 ElseIf ((Session("ImagesEntries") = "Friends") And (varMyFriend <> "Friend")) Then
  varEntry = ReplaceSens(varEntry,"<img","<xxx",1)
 End If  
 varEntryType = rs.Fields("EntryType")
 varNotesType = rs.Fields("NotesType")
 If ((varEntryType = "Friends") And (varNotesType <> "None")) Then varNotesType = "Friends"
End If
varPreviousID = rs.Fields("PreviousID")
varPreviousTitle = "" & rs.Fields("PreviousTitle") & ""
varNextID = rs.Fields("NextID")
varNextTitle = "" & rs.Fields("NextTitle") & ""
rs.Close
Set params(1) = Nothing
Set params(0) = Nothing
Set rs = Nothing
Set comm = Nothing

varAuthorID = varAliasID
If varAuthorID = "" Then
%>
<!--#include file = "redirectlast.inc"-->
<%
End If
%>
<!--#include file = "checkstatus.inc"-->
<%
If (varStatus = "Ignore") Then
 Response.Redirect("toc.asp?AuthorAliasID=" & varAliasID)
 Response.End
ElseIf (((varDiaryType = "Signed") Or (varEntryType = "Signed")) _
And (varStatus = "Unsigned")) Then
 Response.Redirect("toc.asp?AuthorAliasID=" & varAliasID)
 Response.End
ElseIf (((varDiaryType = "Friends") Or (varEntryType = "Friends")) _
And ((varStatus <> "Friend") And (varStatus <> "Author"))) Then
 Response.Redirect("toc.asp?AuthorAliasID=" & varAliasID)
 Response.End
ElseIf (((varDiaryType = "Private") Or (varEntryType = "Private")) _
And (varStatus <> "Author")) Then
 Response.Redirect("toc.asp?AuthorAliasID=" & varAliasID)
 Response.End
End If
%>
<!--#include file = "preferences.inc"-->
<HTML>
 <HEAD>
 <!--#include file = "stylesheet.inc"-->
  <TITLE>
   I n T h e W i r e
  </TITLE>
<%  
If (varStatus = "Author") Then
 Response.Write("<SCRIPT LANGUAGE=" & """" & "JavaScript" & """" & ">" & vbcrlf)
 Response.Write("<!--" & vbcrlf)
 Response.Write("function confirm_delete(){" & vbcrlf)
 Response.Write("input_box=confirm(" & """" & "Are you sure you wish to delete this entry?" & """" & ");" & vbcrlf)
 Response.Write("if (input_box==true)" & vbcrlf)
 Response.Write(" { " & vbcrlf)
 Response.Write("   location.href=" & """" & "deleteentry.asp?EntryID=" & Request("EntryID") & """")
 Response.Write(";" & vbcrlf)
 Response.Write(" }" & vbcrlf)
 Response.Write("}" & vbcrlf)
 Response.Write("-->" & vbcrlf)
 Response.Write("</SCRIPT>" & vbcrlf)
End If

'The following checks to see if the reader is logged-in. If so, it then checks to see if this entry is saved
'on the reader's favorite entries list. (DJM, 06-13-2002)

If (varStatus <> "Unsigned") Then
If (Session("AuthorAliasID") = 1) Then
 Set comm = Server.CreateObject("ADODB.Command")
 Set rs = Server.CreateObject("ADODB.Recordset")
 ReDim params(1)
 params(0) = Session("AuthorAliasID")
 params(1) = Request("EntryID")
 comm.ActiveConnection = "DSN=members_sql;UID=members;PWD=ecfcod3;"
 comm.CommandType = 4
 comm.CommandText = "DM_SP_CheckFavoriteEntry"
 comm.Execute, params
 rs.Open comm
 If ((rs.EOF = False) And (rs.BOF = False)) Then
  varFavoriteEntry = "True"
 Else
  varFavoriteEntry = "False"
 End If
 rs.Close
 Set params(1) = Nothing
 Set params(0) = Nothing
 Set rs = Nothing
 Set comm = Nothing
End If
End If
%>

<%
If (varMyIgnore = True) Then
 Response.Redirect("toc.asp?AuthorAliasID=" & varAliasID)
 Response.End
End If
%>
     </TABLE>
    </TD>
    <TD VALIGN="Top" ALIGN="Center" COLSPAN="1" NAME="Body" ID="Body" WIDTH="85%">
     <TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="1">
      <TR>
       <TD VALIGN="Top" ALIGN="Left" COLSPAN="1" NAME="EntryTitle" ID="EntryTitle" WIDTH="100%">
        <B><%=varEntryTitle%></B>
        <BR><SMALL>by</SMALL> <A HREF="toc.asp?AuthorAliasID=<%=varAliasID%>"><%=varAlias%></A>
       </TD>
       <TD VALIGN="Top" ALIGN="Right" COLSPAN="1" NAME="EntryDate" ID="EntryDate" WIDTH="100%">
        <B><%=varAuthorDateCreated%></B>
       </TD>
      </TR>
      <TR>
       <TD VALIGN="Top" ALIGN="Left" COLSPAN="2" NAME="Entry" ID="Entry" WIDTH="100%">
        <BR>
        <%=varEntry%>
        <BR>
       </TD>
      </TR>
      <TR>
       <TD VALIGN="Top" ALIGN="Left" COLSPAN="1" NAME="Previous" ID="Previous" WIDTH="100%">
<%
If (varPreviousID <> "") Then
 Response.Write("<SMALL>")
 Response.Write("Previous: ")
 Response.Write("<A HREF=" & """" & "entry.asp?EntryID=" & varPreviousID & """" & ">")
 If (varPreviousTitle <> "") Then
  Response.Write(varPreviousTitle)
 Else
  Response.Write(varPreviousID)
 End If
 Response.Write("</A>")
 Response.Write("</SMALL>")
End If
%>      
       </TD>
       <TD VALIGN="Top" ALIGN="Right" COLSPAN="1" NAME="Next" ID="Next" WIDTH="100%">
<%
If (varNextID <> "") Then
 Response.Write("<SMALL>")
 Response.Write("Next: ")
 Response.Write("<A HREF=" & """" & "entry.asp?EntryID=" & varNextID & """" & ">")
 If (varNextTitle <> "") Then
  Response.Write(varNextTitle)
 Else
  Response.Write(varNextID)
 End If
 Response.Write("</A>")
 Response.Write("</SMALL>")
End If
%>  
       </TD>
      </TR>
       <TD VALIGN="Top" ALIGN="Center" COLSPAN="2" NAME="Notes" ID="Notes" WIDTH="100%">
        <HR Width="95%">
        <TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="1">
         <FORM NAME="DeleteNotes" ACTION="deletenote.asp">
<%
ReDim params(1)
params(0) = Request("EntryID")
params(1) = int(Session("AuthorAliasID"))
Set comm = Server.CreateObject("ADODB.Command")
Set rs = Server.CreateObject("ADODB.Recordset")

comm.ActiveConnection = "DSN=members_sql;UID=members;PWD=ecfcod3;"
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectNotesByEntry"
comm.Execute , params
rs.Open comm
If ((rs.EOF = False) And (rs.BOF = False)) Then
 varAnyNotes = True
 If ((varStatus = "Author") And (varAnyNotes = True)) Then
 Response.Write("<TR>")
 Response.Write("<TD VALIGN=" & """" & "Center" & """")
 Response.Write(" ALIGN=" & """" & "Center" & """")
 Response.Write(" COLSPAN=" & """" & "3" & """" & " WIDTH=" & """" & "100%" & """" & ">")
 Response.Write("<INPUT CLASS=" & """" & "Button" & """" & " TYPE=" & """" & "SUBMIT" & """")
 Response.Write(" VALUE=" & """" & "Delete Checked Notes" & """" & ">")
 Response.Write("<HR Width=" & """" & "95%" & """" & ">")
 Response.Write("</TD>")
 Response.Write("</TR>")
End If
 Do While Not rs.EOF
  varNote = Replace(rs.Fields("Note"),vbcrlf,"<BR>")
  If (Session("Javascript") = "None") Then
   varNote = ReplaceSens(varNote,"{","",1)
   varNote = ReplaceSens(varNote,"<style>","<xxxxx>",1)
  End If
  If (Session("Music") = "None") Then
   varNote = ReplaceSens(varNote,"<bgsound","<xxxxxx",1)
   varNote = ReplaceSens(varNote,"<embed","<xxxxx",1)
  End If
  varNote = ReplaceSens(varNote,"background:","xxxxxxxxxx:",1)
  varNote = ReplaceSens(varNote,"background=","xxxxxxxxxx=",1)
  varNote = ReplaceSens(varNote,"background-","xxxxxxxxxx-",1)
  If (Session("ImagesNotes") = "None") Then
   varNote = ReplaceSens(varNote,"<img","<xxx",1)
  ElseIf ((Session("ImagesNotes") = "Friends") And (varMyFriend <> "Friend")) Then
   varNote = ReplaceSens(varNote,"<img","<xxx",1)
  End If  
  Response.Write("<TR>")
  Response.Write("<TD ALIGN=" & """" & "Left" & " COLSPAN=" & """" & "1" & """" & ">")
  Response.Write("<SMALL><B>")
  Response.Write(FormatDateTime(rs.Fields("DateCreated"),1) & " " & FormatDateTime(rs.Fields("DateCreated"),3))
  Response.Write("</SMALL></B>")
  Response.Write("</TD>")
  Response.Write("<TD ALIGN=" & """" & "Center" & " COLSPAN=" & """" & "1" & """" & ">")
  Response.Write("<SMALL>")
  If (rs.Fields("NoteType") = "Author") Then
   Response.Write("<B>***** Author Note *****</B>")
  Else
   Response.Write(rs.Fields("NoteType") & " Note")
  End If
  Response.Write("</SMALL>")
  Response.Write("</TD>")
  Response.Write("<TD ALIGN=" & """" & "Right" & " COLSPAN=" & """" & "1" & """" & ">")
  If (varStatus = "Author") Then
   Response.Write("<INPUT TYPE=" & """" & "Checkbox" & """" & " NAME=" & """" & "NoteID" & """")
   Response.Write(" VALUE=" & """" & rs.Fields("NoteID") & """" & ">")
   Response.Write("<SMALL>Delete</SMALL> ")
  End If  
  Response.Write("</TD>")
  Response.Write("</TR>")
  Response.Write("<TR>")
  Response.Write("<TD COLSPAN=" & """" & "3" & """" & ">")
  Response.Write("<SPAN CLASS=" & """" & "Note" & """" & ">")
  Response.Write(varNote)
  If (rs.Fields("Alias") <> "") Then
   If (rs.Fields("FromID") <> 0) Then
    Response.Write(" [")
    Response.Write("<A HREF=" & """" & "toc.asp?AuthorAliasID=" & rs.Fields("FromID") & """" & ">")
    Response.Write(rs.Fields("Alias"))
    Response.Write("</A>")
    Response.Write("]")
   Else
    Response.Write(" [")
    Response.Write("<A>")
    Response.Write(rs.Fields("Alias"))
    Response.Write("</A> (deleted)")
    Response.Write("]")
   End If
  End If
  Response.Write("<BR>")
  Response.Write("<BR>")
  Response.Write("</SPAN>")
  Response.Write("</TD>")
  Response.Write("</TR>")  
 rs.MoveNext
 Loop
Else
 varAnyNotes = False
End If
rs.Close

Set params(1) = Nothing
Set params(0) = Nothing
Set rs = Nothing
Set comm = Nothing

%>  
         </FORM>
        </TABLE>
       </TD>
      <TR>
       <TD VALIGN="Top" ALIGN="Center" COLSPAN="2" WIDTH="100%">
        <TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="1">
<%
 varAllowNotes = False
 If (varNotesType <> "None") Then
  If ((varNotesType = "Signed") And (varStatus <> "Unsigned")) Then
   varAllowNotes = True
  ElseIf ((varNotesType = "Friends") And ((varStatus = "Friend") Or (varStatus = "Author"))) Then
   varAllowNotes = True
  ElseIf (varNotesType = "All") Then
   varAllowNotes = True
  End If  
 End If
 
 If (varAllowNotes = True) Then
  Response.Write("<FORM NAME=" & """" & "AddNote" & """" & " METHOD=" & """" & "Post" & """")
  Response.Write(" ACTION=" & """" & "savenote.asp?ToID=" & varAliasID)
  Response.Write("&EntryID=" & Request("EntryID") & """" & ">")
  Response.Write("<SCRIPT LANGUAGE=" & """" & "JavaScript" & """" & " TYPE=" & """" & "Text/JavaScript" & """")
  Response.Write(">" & vbcrlf)
  Response.Write("<!--" & vbcrlf & vbcrlf)
  Response.Write("function countCharacters(){")
  Response.Write("(document.AddNote.charUsed.value = document.AddNote.Note.value.length);" & vbcrlf)
  Response.Write("(document.AddNote.charLeft.value = (2000 - document.AddNote.Note.value.length));" & vbcrlf)
  Response.Write("}")
  Response.Write(vbcrlf & vbcrlf& "//--> ")
  Response.Write("</SCRIPT>")
  Response.Write("<TR>")
  Response.Write("<TH VALIGN=" & """" & "Center" & """" & " ALIGN=" & """" & "Right" & """" & ">")
  Response.Write("Characters in Note:")
  Response.Write("</TH>")
  Response.Write("<TD VALIGN=" & """" & "Center" & """" & " ALIGN=" & """" & "Left" & """" & ">")
  Response.Write("<INPUT ACTIVE=" & """" & "False" & """" & " NAME=" & """" & "charUsed" & """" & " TYPE=" & """" & "Text" & """" & " SIZE=" & """" & "6" & """" & " MAXLENGTH=" & """" & "7" & """" & " VALUE=" & """" & "0" & """" & ">")
  Response.Write("</TD>")
  Response.Write("<TH VALIGN=" & """" & "Center" & """" & " ALIGN=" & """" & "Right" & """" & ">")
  Response.Write("Characters Remaining:")
  Response.Write("</TH>")
  Response.Write("<TD VALIGN=" & """" & "Center" & """" & " ALIGN=" & """" & "Left" & """" & ">")
  Response.Write("<INPUT NAME=" & """" & "charLeft" & """" & " TYPE=" & """" & "Text" & """" & " SIZE=" & """" & "6" & """" & " MAXLENGTH=" & """" & "7" & """" & " VALUE=" & """" & "2000" & """" & ">")
  Response.Write("</TD>")
  Response.Write("<TR>")
  Response.Write("<TD ALIGN=" & """" & "Center" & """" & " VALIGN=" & """" & "Center" & """" & "COLSPAN=4" & """" & ">")
  Response.Write("<TEXTAREA onKeyUp=" & """" & "countCharacters();" & """" & " NAME=" & """" & "Note" & """")
  Response.Write("ROWS=8 ")
  If (varScreenWidth > 900) Then
   Response.Write("COLS=90")
  Else
   Response.Write("COLS=72")
  End If
  Response.Write(" WRAP=Virtual></TEXTAREA>")
  Response.Write("</TD>")
  Response.Write("</TR>")
  Response.Write("<TR>")
  Response.Write("<TD ALIGN=" & """" & "Center" & """" & " VALIGN=" & """" & "Center" & """" & "COLSPAN=4" & """" & ">")
  If (Session("AuthorAliasID") <> Empty) Then
   Response.Write(" <INPUT CLASS=" & """" & "Button" & """" & " TYPE=" & """" & "Submit" & """" & " NAME=" & """")
   Response.Write("Signature" & """" &" VALUE=" & """" & "Leave SIGNED Note" & """" & ">" & vbcrlf)
  End If
  If (varNotesType <> "Signed") Then
   Response.Write("<INPUT CLASS=" & """" & "Button" & """" & " TYPE=" & """" & "Submit" & """" & " NAME=" & """")
   Response.Write("Signature" & """" & " VALUE=" & """" & "Leave UNSIGNED Note" & """" & ">")
  End If
  Response.Write(" <SELECT NAME=" & """" & "Type" & """" & ">")
  If ((varNotesType = "All") Or (varNotesType = "Signed")) Then
   Response.Write("<OPTION SELECTED VALUE=" & """" & "Public" & """" & ">Anyone can read this note</OPTION>")
   Response.Write("<OPTION VALUE=" & """" & "Signed" & """" & ">Logged in people can read this note</OPTION>")
   Response.Write("<OPTION VALUE=" & """" & "Friend" & """" & ">" & varAlias & "'s friends can read this note</OPTION>")
   Response.Write("<OPTION VALUE=" & """" & "Author" & """" & ">" & varAlias & " can read this note</OPTION>")
  End If
  If (varNotesType = "Friends") Then
   Response.Write("<OPTION SELECTED VALUE=" & """" & "Friend" & """" & ">")
   Response.Write(varAlias)
   Response.Write("'s friends can read this note</OPTION>")
   Response.Write("<OPTION VALUE=" & """" & "Author" & """" & ">" & varAlias & " can read this note</OPTION>")
  End If
  Response.Write("</SELECT>")
  Response.Write("</TD>")
  Response.Write(" </TR>")
  If (Session("AuthorAliasID") <> "") Then
   Set comm = Server.CreateObject("ADODB.Command")
   comm.ActiveConnection = "DSN=members_sql;UID=members;PWD=ecfcod3;"
   comm.CommandType = 4
   comm.CommandText = "DM_SP_CreateKeypair"
   ReDim params(1)
   params(0) = Session("AuthorAliasID")
   params(1) = "" & Session("AuthorAlias") & ""
   comm.Execute , params
   Set comm = Nothing
   Set comm = Server.CreateObject("ADODB.Command")
   Set rs = Server.CreateObject("ADODB.Recordset")
   comm.ActiveConnection = conn
   comm.CommandType = 4
   comm.CommandText = "DM_SP_SelectKey"
   comm.Execute , params(0)
   Set params(1) = Nothing
   Set params(0) = Nothing
   rs.Open comm
   If ((rs.EOF = False) And (rs.BOF = False)) Then
    Response.Write("<INPUT TYPE=" & """" & "Hidden" & """" & " NAME=" & """" & "Key" & """" & " VALUE=" & """")
    Response.Write(rs.Fields("PublicKey"))
    Response.Write("""" & ">")
   End If
   rs.Close
   Set rs = Nothing
   Set comm = Nothing
  End If
  Response.Write("</FORM>")
 End If
%>
        </TABLE>
       </TD>
      </TR>
     </TABLE>
    </TD>
   </TR>
 
             </p>
               
            </p>  </FONT></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
 
  <tr>
    <td class="btfoot">
      <div align="center"><FONT face=Verdana>© 2002 Teen Writing Net. All rights reserved. Page design by </FONT>  
                   <!--#include file = "footer.xhtml"-->  <br>
                           
          <a href="http://www.teenwriting.net" target="_blank"><FONT
      face=Verdana>TEEN WRITING NET</FONT> </FONT></a><FONT
      face=Verdana>.</FONT></FONT></div></td></tr></table></FONT>
</body>
</html>
<%
 ReDim params(1)
 params(0) = Request("EntryID")
 params(1) = varStatus
 Set comm = Server.CreateObject("ADODB.Command")
 comm.ActiveConnection = "DSN=members_sql;UID=members;PWD=ecfcod3;"
 comm.CommandType = 4
 comm.CommandText = "DM_SP_IncrementEntry"
 comm.Execute , params
 Set params(1) = Nothing
 Set params(0) = Nothing
 Set comm = Nothing
%>
0
Comment
Question by:mtrxpoet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 6
  • 6
  • +2
27 Comments
 
LVL 15

Expert Comment

by:gladxml
ID: 8076500
mtrxpoet,

This error occurs when there is no data return on your query...

It might be helpful assuming that your recordset object is rs then you can write somethind like this

if rs.eof then

response.write "No record found"

else

'necessary action that you need to do

end if

HTH...

0
 
LVL 18

Expert Comment

by:mgfranz
ID: 8076528
0
 

Author Comment

by:mtrxpoet
ID: 8076887
mgfranz what kinda software is that link talking about using (this is prob part of my prob cause i wrote everything by hand first)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:gladxml
ID: 8076942
mtrxpoet,

Could you please check out this line..
Repalce this line

If ((rs.EOF = False) And (rs.BOF = False)) Then

with this

If not(rs.EOF) And not(rs.BOF) Then


or you can bound the value false with qoutes

If ((rs.EOF = "False") And (rs.BOF = "False")) Then


0
 

Author Comment

by:mtrxpoet
ID: 8077101
gladxml

tried that and came up with the same error. thanks anyways
0
 
LVL 15

Expert Comment

by:gladxml
ID: 8077204
mtrxpoet,

Could you run this script... and check the result...


<!--#include file = "security.inc"-->
<!--#include file = "ensureconnection.inc"-->
<!--#include file = "stringreplace.inc"-->
<%
Dim varEntryTitle,varAuthorDateCreated,varAliasID,varAlias,varEntry,varEntryType,varNotesType
Set comm = Server.CreateObject("ADODB.Command")
Set rs = Server.CreateObject("ADODB.Recordset")
ReDim params(1)
params(0) = int(Request("EntryID"))
params(1) = int(Session("AuthorAliasID"))
comm.ActiveConnection = "DSN=members_sql;UID=members;PWD=ecfcod3;"
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectEntry"
comm.Execute , params
rs.Open comm


If rs.EOF Then

response.write "No data found"

else

response.write "Records exist"

end if


%>
0
 
LVL 4

Expert Comment

by:Wakie
ID: 8077814
Hi, try this code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>TEEN WRITING NET</title>
<meta http-equiv="Content-Type" content="text/css; charset=iso-8859-1">
<meta name="description" content="The newest teen writing site and contest.">
<meta name="keywords" content="keyword, keyword, keyword, keyword, keyword, keyword, keyword phrase, keyword phrase, keyword phrase, keyword phrase">
<meta name="copyright" content="2002 Teenwriting.net.  All rights reserved.  Duplication of any content on this site is prohibited.">
<meta name="design by" content="Teenwriting.net">
<meta name="robots" content="all">
<meta name="revisit-after" content="7 days">
<meta name="distribution" content="global">
<meta name="document-classification" content="General">
<meta name="rating" content="general">
<meta name="language" content="EN">

<script language="JavaScript">
function doClock(){
 var t=new Date(),a=doClock.arguments,str="",i,a1,lang="1";
 var month=new Array('January','Jan', 'February','Feb', 'March','Mar', 'April','Apr', 'May','May', 'June','Jun', 'July','Jul', 'August','Aug', 'September','Sep', 'October','Oct', 'November','Nov', 'December','Dec');
 var tday= new Array('Sunday','Sun','Monday','Mon', 'Tuesday','Tue', 'Wednesday','Wed','Thursday','Thr','Friday','Fri','Saturday','Sat');
 for(i=0;i<a.length;i++) {a1=a[i].charAt(1);switch (a[i].charAt(0)) {
 case "M":if  ((Number(a1)==3) && ((t.getMonth()+1)<10)) str+="0";
 str+=(Number(a1)>1)?t.getMonth()+1:month[t.getMonth()*2+Number(a1)];break;
 case "D": if ((Number(a1)==1) && (t.getDate()<10)) str+="0";str+=t.getDate();break;
 case "Y": str+=(a1=='0')?t.getFullYear():t.getFullYear().toString().substring(2);break;
 case "W":str+=tday[t.getDay()*2+Number(a1)];break; default: str+=unescape(a[i]);}}return str;
}
</script>


<link rel="stylesheet" href="http://www.teenwriting.net/btstyle19.css" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><FONT face=Verdana>
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolor="#a4a09f">
 <tr valign="center" align="middle">
   <td colspan="6" class="bthead" height="2">
     <div align="left"><A href="#"><FONT face=Verdana>
       <IMG height=90 alt="REPLACE WITH MEANINGFUL IMAGE DESCRIPTION" src  ="http://teenwriting.net/header.jpg" width=750 border=0 ></FONT></A></div>
   </td>
 </tr>
 <tr valign="center" align="middle">
   <td width="16%" class="btnav" height="20">
     <div align="center"><a href="http://poetry.teenwriting.net"><FONT
     face=Verdana>Poetry</FONT></a></div>
   </td>
   <td class="btnav" height="20" width="16%">
     <div align="center"><a href="http://songs.teenwriting.net"><FONT
     face=Verdana>Songs</FONT></a></div>
   </td>
   <td class="btnav" height="20" width="15%">
     <div align="center"><A href="http://stories.teenwriting.net"><FONT face=Verdana>Stories</FONT></A></div>
   </td>
   <td class="btnav" height="20" width="17%">
     <div align="center"><A href="http://essay.teenwriting.net"><FONT face=Verdana>Essay</FONT></A></div>
   </td>
   <td class="btnav" height="20" width="17%">
     <div align="center"><A href="http://fiction.teenwriting.net"><FONT face=Verdana>Fiction</FONT></A></div>
   </td>
   <td width="19%" class="btnav" height="20">
     <div align="center"><A href="http://fanfic.teenwriting.net"><FONT
 face=Verdana>Fan Fiction</FONT></A></div>
   </td>
 </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <TBODY>
 <tr>
   <td valign="top" height="514">
     <table width="100%" border="0" cellspacing="0" cellpadding="1">
       <tr>
         <td class="btnavbk" height="98"><FONT
           face=Verdana>&nbsp;</FONT></td>
         <td class="btnavbk" valign="center" height="98">
           <table width="99%" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000" align="center">
             <tr>
               <td height="2" bgcolor="#a4a09f">
                 <div align="center"> <b><FONT face=Verdana>Current
                 News</FONT> </b></div>
               </td>
             </tr>
             <tr>
               <td class="btnavbk" valign="top" height="67">
                 <table width="100%" border="0" cellspacing="0" cellpadding="8">
                   <tr>
                     <td bgcolor="#ffffff" valign="top" height="54">
                       <p><FONT face=Verdana>Hi every one! Welcome to the new spot for teen writngs. We are still currently
                              hard at work trying ot get this awesome and fun site up and running! Check back often cause we will
                              be offering tons of cool things for everyone to do.  You'll be able to post your work and read and
                              critique other teens writings and enjoy contest as well! If you have any ideas or suggestions please
                              feel free to email us at: <A href="mailto:suggestions@teenwriting.net">suggestions</A>! Thanks again
                              for looking. Please check back soon!
                   </FONT>  
</p>
                     </td>
                   </tr>
                 </table>
               </td>
             </tr>
           </table>
         </td>
       </tr>
     </table>
     
       <table width="100%" border="0" cellspacing="0" cellpadding="8">
       <TBODY>
       <tr>
         <td valign="top" class="btnavbk" width="20%" height="433">
           <p align="center"><FONT face=Verdana><FONT>
           <TABLE borderColor=#000000 cellSpacing=0 cellPadding=8 width="100%"
           border=1>          <p align="center"><FONT face=Verdana><FONT><IMG height=1 src="images/clear.gif" width=160><br>
             <b>
             <script language="JavaScript">
  document.write(doClock("M0","%20","D0",",%20","Y0"));
</script>
             </b></FONT>
<!--#include file = "menu.xhtml"-->
           <br>
           <table width="100%" border="1" cellspacing="0" cellpadding="8" bordercolor="#000000">
             <tr>
               <td bgcolor="#ffffff" valign="top" height="254">
                 <table width="100%" border="0" cellspacing="0" cellpadding="1">
                   <tr>
                     <td class="btnavbk">
                       <div align="center"><FONT
                       face=Verdana>Coming Events </FONT>  </div>
                     </td>
                   </tr>
                   <tr>
                     <td><FONT face=Verdana>We will be up and running very shortly now! We are hard at work
                           and working with local companies to bring you some really new and cool things! If you have any
                           questions or comments please <A href="mailto:suggestions@teenwriting.net">email us</A>!
                 </FONT>  
                   
                              </td>
                   </tr>
                 </table>
                 
               </td>
             </tr>
           </table>
           <p><FONT face=Verdana>
           <TABLE borderColor=#000000 cellSpacing=0 cellPadding=8 width="100%"
           border=1>
             
             <TR>
               <TD vAlign=top width=75 bgColor=#ffffff height=84>
                 <P><A href="#"><FONT
                 face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                 face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                 face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                 face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                 face=Verdana>Your Link</FONT> </A><BR></P></TD>
               <TD vAlign=top width=75 bgColor=#ffffff height=84><A
                 href="#"><FONT
                 face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                 face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                 face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                 face=Verdana>Your Link</FONT> </A><BR><A href="#"><FONT
                 face=Verdana>Your Link</FONT>
           </A><BR></TD></TR></TABLE></FONT></p>
         </td>
         <td valign="top" width="64%" height="433">
           <p><br><FONT
           face=Verdana>
         <p>
           <!--#include file = "header.xhtml"--><br>
          <%

If (Request("EntryID") = "") Then
Response.Redirect("/")
Response.End
End If
Dim varPageName
Dim varAuthorID
Dim varAnyNotes
Dim varAllowNotes
Dim varNote
Dim varDiaryType
Dim varPreviousID,varPreviousTitle
Dim varNextID,varNextTitle
Dim varFavoriteEntry
Dim varAvailable

varPageName = "Entry"
%>
<!--#include file = "security.inc"-->
<!--#include file = "ensureconnection.inc"-->
<!--#include file = "stringreplace.inc"-->
<%
Dim varEntryTitle,varAuthorDateCreated,varAliasID,varAlias,varEntry,varEntryType,varNotesType
Set comm = Server.CreateObject("ADODB.Command")
Set rs = Server.CreateObject("ADODB.Recordset")
ReDim params(1)
params(0) = int(Request("EntryID"))
params(1) = int(Session("AuthorAliasID"))
comm.ActiveConnection = "DSN=members_sql;UID=members;PWD=ecfcod3;"
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectEntry"
comm.Execute , params
rs.Open comm
If Not rs.EOF Then
      varEntryTitle = rs.Fields("Title")
      varAuthorDateCreated = FormatDateTime(rs.Fields("AuthorDateCreated"),2)
      varAliasID = rs.Fields("AliasID")
      varAlias = rs.Fields("Alias")
      varDiaryType = rs.Fields("DiaryType")
      varAvailable = rs.Fields("Available")
      If (rs.Fields("EntryType") = "Private") Then
            varEntry = "<CENTER><B>-- -- -- Private Entry -- -- --</B></CENTER><BR><BR>" & Replace(rs.Fields("Entry"),vbcrlf,"<BR>")
      ElseIf (rs.Fields("EntryType") = "Friends") Then
 varEntry = "<CENTER><B>-- -- -- Friends Entry -- -- --</B></CENTER><BR><BR>" & Replace(rs.Fields("Entry"),vbcrlf,"<BR>")
      Else
            varEntry = Replace(rs.Fields("Entry"),vbcrlf,"<BR>")
      End If
      If (Session("AllowMusic") = "None") Then
            varEntry = ReplaceSens(varEntry,"<bgsound","<xxxxxxx",1)
            varEntry = ReplaceSens(varEntry,"<embed","<xxxxx",1)
      End If
      If (Session("BackgroundImages") = "None") Then
            varEntry = ReplaceSens(varEntry,"background:","xxxxxxxxxx:",1)
            varEntry = ReplaceSens(varEntry,"background=","xxxxxxxxxx=",1)
            varEntry = ReplaceSens(varEntry,"background-","xxxxxxxxxx-",1)
      End If
      If (Session("ImagesEntries") = "None") Then
            varEntry = ReplaceSens(varEntry,"<img","<xxx",1)
      ElseIf ((Session("ImagesEntries") = "Friends") And (varMyFriend <> "Friend")) Then
            varEntry = ReplaceSens(varEntry,"<img","<xxx",1)
      End If  
      varEntryType = rs.Fields("EntryType")
      varNotesType = rs.Fields("NotesType")
      If ((varEntryType = "Friends") And (varNotesType <> "None")) Then varNotesType = "Friends"
      End If
      varPreviousID = rs.Fields("PreviousID")
      varPreviousTitle = "" & rs.Fields("PreviousTitle") & ""
      varNextID = rs.Fields("NextID")
      varNextTitle = "" & rs.Fields("NextTitle") & ""
      rs.Close
      Set params(1) = Nothing
      Set params(0) = Nothing
      Set rs = Nothing
      Set comm = Nothing
      varAuthorID = varAliasID
      If varAuthorID = "" Then
            %><!--#include file = "redirectlast.inc"--><%
      End If
      %><!--#include file = "checkstatus.inc"--><%
      If (varStatus = "Ignore") Then
            Response.Redirect("toc.asp?AuthorAliasID=" & varAliasID)
            Response.End
      ElseIf (((varDiaryType = "Signed") Or (varEntryType = "Signed")) And (varStatus = "Unsigned")) Then
            Response.Redirect("toc.asp?AuthorAliasID=" & varAliasID)
            Response.End
      ElseIf (((varDiaryType = "Friends") Or (varEntryType = "Friends")) And ((varStatus <> "Friend") And (varStatus <> "Author"))) Then
            Response.Redirect("toc.asp?AuthorAliasID=" & varAliasID)
            Response.End
      ElseIf (((varDiaryType = "Private") Or (varEntryType = "Private")) And (varStatus <> "Author")) Then
            Response.Redirect("toc.asp?AuthorAliasID=" & varAliasID)
            Response.End
      End If
%><!--#include file = "preferences.inc"-->
<HTML>
<HEAD>
<!--#include file = "stylesheet.inc"-->
 <TITLE>
  I n T h e W i r e
 </TITLE>
<%  
If (varStatus = "Author") Then
Response.Write("<SCRIPT LANGUAGE=" & """" & "JavaScript" & """" & ">" & vbcrlf)
Response.Write("<!--" & vbcrlf)
Response.Write("function confirm_delete(){" & vbcrlf)
Response.Write("input_box=confirm(" & """" & "Are you sure you wish to delete this entry?" & """" & ");" & vbcrlf)
Response.Write("if (input_box==true)" & vbcrlf)
Response.Write(" { " & vbcrlf)
Response.Write("   location.href=" & """" & "deleteentry.asp?EntryID=" & Request("EntryID") & """")
Response.Write(";" & vbcrlf)
Response.Write(" }" & vbcrlf)
Response.Write("}" & vbcrlf)
Response.Write("-->" & vbcrlf)
Response.Write("</SCRIPT>" & vbcrlf)
End If

'The following checks to see if the reader is logged-in. If so, it then checks to see if this entry is saved
'on the reader's favorite entries list. (DJM, 06-13-2002)

If (varStatus <> "Unsigned") Then
      If (Session("AuthorAliasID") = 1) Then
            Set comm = Server.CreateObject("ADODB.Command")
            Set rs = Server.CreateObject("ADODB.Recordset")
            ReDim params(1)
            params(0) = Session("AuthorAliasID")
            params(1) = Request("EntryID")
            comm.ActiveConnection = "DSN=members_sql;UID=members;PWD=ecfcod3;"
            comm.CommandType = 4
            comm.CommandText = "DM_SP_CheckFavoriteEntry"
            comm.Execute, params
            rs.Open comm
            If Not rs.EOF Then
                  varFavoriteEntry = "True"
            Else
                  varFavoriteEntry = "False"
            End If
            rs.Close
            Set params(1) = Nothing
            Set params(0) = Nothing
            Set rs = Nothing
            Set comm = Nothing
      End If
End If

If (varMyIgnore = True) Then
      Response.Redirect("toc.asp?AuthorAliasID=" & varAliasID)
      Response.End
End If
%>
    </TABLE>
   </TD>
   <TD VALIGN="Top" ALIGN="Center" COLSPAN="1" NAME="Body" ID="Body" WIDTH="85%">
    <TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="1">
     <TR>
      <TD VALIGN="Top" ALIGN="Left" COLSPAN="1" NAME="EntryTitle" ID="EntryTitle" WIDTH="100%">
       <B><%=varEntryTitle%></B>
       <BR><SMALL>by</SMALL> <A HREF="toc.asp?AuthorAliasID=<%=varAliasID%>"><%=varAlias%></A>
      </TD>
      <TD VALIGN="Top" ALIGN="Right" COLSPAN="1" NAME="EntryDate" ID="EntryDate" WIDTH="100%">
       <B><%=varAuthorDateCreated%></B>
      </TD>
     </TR>
     <TR>
      <TD VALIGN="Top" ALIGN="Left" COLSPAN="2" NAME="Entry" ID="Entry" WIDTH="100%">
       <BR>
       <%=varEntry%>
       <BR>
      </TD>
     </TR>
     <TR>
      <TD VALIGN="Top" ALIGN="Left" COLSPAN="1" NAME="Previous" ID="Previous" WIDTH="100%"><%
If (varPreviousID <> "") Then
      Response.Write("<SMALL>")
      Response.Write("Previous: ")
      Response.Write("<A HREF=" & """" & "entry.asp?EntryID=" & varPreviousID & """" & ">")
      If (varPreviousTitle <> "") Then
            Response.Write(varPreviousTitle)
      Else
            Response.Write(varPreviousID)
      End If
      Response.Write("</A>")
      Response.Write("</SMALL>")
End If
%>      
      </TD>
      <TD VALIGN="Top" ALIGN="Right" COLSPAN="1" NAME="Next" ID="Next" WIDTH="100%"><%
If (varNextID <> "") Then
      Response.Write("<SMALL>")
      Response.Write("Next: ")
      Response.Write("<A HREF=" & """" & "entry.asp?EntryID=" & varNextID & """" & ">")
      If (varNextTitle <> "") Then
            Response.Write(varNextTitle)
      Else
            Response.Write(varNextID)
      End If
      Response.Write("</A>")
      Response.Write("</SMALL>")
End If
%>  
      </TD>
     </TR>
      <TD VALIGN="Top" ALIGN="Center" COLSPAN="2" NAME="Notes" ID="Notes" WIDTH="100%">
       <HR Width="95%">
       <TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="1">
        <FORM NAME="DeleteNotes" ACTION="deletenote.asp">
<%
ReDim params(1)
params(0) = Request("EntryID")
params(1) = int(Session("AuthorAliasID"))
Set comm = Server.CreateObject("ADODB.Command")
Set rs = Server.CreateObject("ADODB.Recordset")

comm.ActiveConnection = "DSN=members_sql;UID=members;PWD=ecfcod3;"
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectNotesByEntry"
comm.Execute , params
rs.Open comm
If not rs.EOF Then
      varAnyNotes = True
      If ((varStatus = "Author") And (varAnyNotes = True)) Then
            Response.Write("<TR>")
            Response.Write("<TD VALIGN=" & """" & "Center" & """")
            Response.Write(" ALIGN=" & """" & "Center" & """")
            Response.Write(" COLSPAN=" & """" & "3" & """" & " WIDTH=" & """" & "100%" & """" & ">")
            Response.Write("<INPUT CLASS=" & """" & "Button" & """" & " TYPE=" & """" & "SUBMIT" & """")
            Response.Write(" VALUE=" & """" & "Delete Checked Notes" & """" & ">")
            Response.Write("<HR Width=" & """" & "95%" & """" & ">")
            Response.Write("</TD>")
            Response.Write("</TR>")
      End If
      Do While Not rs.EOF
            varNote = Replace(rs.Fields("Note"),vbcrlf,"<BR>")
            If (Session("Javascript") = "None") Then
                  varNote = ReplaceSens(varNote,"{","",1)
                  varNote = ReplaceSens(varNote,"<style>","<xxxxx>",1)
            End If
            If (Session("Music") = "None") Then
                  varNote = ReplaceSens(varNote,"<bgsound","<xxxxxx",1)
                  varNote = ReplaceSens(varNote,"<embed","<xxxxx",1)
            End If
            varNote = ReplaceSens(varNote,"background:","xxxxxxxxxx:",1)
            varNote = ReplaceSens(varNote,"background=","xxxxxxxxxx=",1)
            varNote = ReplaceSens(varNote,"background-","xxxxxxxxxx-",1)
            If (Session("ImagesNotes") = "None") Then
                  varNote = ReplaceSens(varNote,"<img","<xxx",1)
            ElseIf ((Session("ImagesNotes") = "Friends") And (varMyFriend <> "Friend")) Then
                  varNote = ReplaceSens(varNote,"<img","<xxx",1)
            End If  
            Response.Write("<TR>")
            Response.Write("<TD ALIGN=" & """" & "Left" & " COLSPAN=" & """" & "1" & """" & ">")
            Response.Write("<SMALL><B>")
            Response.Write(FormatDateTime(rs.Fields("DateCreated"),1) & " " & FormatDateTime(rs.Fields("DateCreated"),3))
            Response.Write("</SMALL></B>")
            Response.Write("</TD>")
            Response.Write("<TD ALIGN=" & """" & "Center" & " COLSPAN=" & """" & "1" & """" & ">")
            Response.Write("<SMALL>")
            If (rs.Fields("NoteType") = "Author") Then
                  Response.Write("<B>***** Author Note *****</B>")
            Else
                  Response.Write(rs.Fields("NoteType") & " Note")
            End If
            Response.Write("</SMALL>")
            Response.Write("</TD>")
            Response.Write("<TD ALIGN=" & """" & "Right" & " COLSPAN=" & """" & "1" & """" & ">")
            If (varStatus = "Author") Then
                  Response.Write("<INPUT TYPE=" & """" & "Checkbox" & """" & " NAME=" & """" & "NoteID" & """")
                  Response.Write(" VALUE=" & """" & rs.Fields("NoteID") & """" & ">")
                  Response.Write("<SMALL>Delete</SMALL> ")
            End If  
            Response.Write("</TD>")
            Response.Write("</TR>")
            Response.Write("<TR>")
            Response.Write("<TD COLSPAN=" & """" & "3" & """" & ">")
            Response.Write("<SPAN CLASS=" & """" & "Note" & """" & ">")
            Response.Write(varNote)
             If (rs.Fields("Alias") <> "") Then
                    If (rs.Fields("FromID") <> 0) Then
                           Response.Write(" [")
                           Response.Write("<A HREF=" & """" & "toc.asp?AuthorAliasID=" & rs.Fields("FromID") & """" & ">")
                           Response.Write(rs.Fields("Alias"))
                           Response.Write("</A>")
                           Response.Write("]")
                    Else
                           Response.Write(" [")
                           Response.Write("<A>")
                           Response.Write(rs.Fields("Alias"))
                           Response.Write("</A> (deleted)")
                           Response.Write("]")
                    End If
             End If
             Response.Write("<BR>")
             Response.Write("<BR>")
             Response.Write("</SPAN>")
             Response.Write("</TD>")
             Response.Write("</TR>")  
           rs.MoveNext
      Loop
Else
      varAnyNotes = False
End If
rs.Close

Set params(1) = Nothing
Set params(0) = Nothing
Set rs = Nothing
Set comm = Nothing
%>  
        </FORM>
       </TABLE>
      </TD>
     <TR>
      <TD VALIGN="Top" ALIGN="Center" COLSPAN="2" WIDTH="100%">
       <TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="1">
<%
varAllowNotes = False
If (varNotesType <> "None") Then
      If ((varNotesType = "Signed") And (varStatus <> "Unsigned")) Then
            varAllowNotes = True
      ElseIf ((varNotesType = "Friends") And ((varStatus = "Friend") Or (varStatus = "Author"))) Then
            varAllowNotes = True
      ElseIf (varNotesType = "All") Then
            varAllowNotes = True
      End If  
End If

If (varAllowNotes = True) Then
 Response.Write("<FORM NAME=" & """" & "AddNote" & """" & " METHOD=" & """" & "Post" & """")
 Response.Write(" ACTION=" & """" & "savenote.asp?ToID=" & varAliasID)
 Response.Write("&EntryID=" & Request("EntryID") & """" & ">")
 Response.Write("<SCRIPT LANGUAGE=" & """" & "JavaScript" & """" & " TYPE=" & """" & "Text/JavaScript" & """")
 Response.Write(">" & vbcrlf)
 Response.Write("<!--" & vbcrlf & vbcrlf)
 Response.Write("function countCharacters(){")
 Response.Write("(document.AddNote.charUsed.value = document.AddNote.Note.value.length);" & vbcrlf)
 Response.Write("(document.AddNote.charLeft.value = (2000 - document.AddNote.Note.value.length));" & vbcrlf)
 Response.Write("}")
 Response.Write(vbcrlf & vbcrlf& "//--> ")
 Response.Write("</SCRIPT>")
 Response.Write("<TR>")
 Response.Write("<TH VALIGN=" & """" & "Center" & """" & " ALIGN=" & """" & "Right" & """" & ">")
 Response.Write("Characters in Note:")
 Response.Write("</TH>")
 Response.Write("<TD VALIGN=" & """" & "Center" & """" & " ALIGN=" & """" & "Left" & """" & ">")
 Response.Write("<INPUT ACTIVE=" & """" & "False" & """" & " NAME=" & """" & "charUsed" & """" & " TYPE=" & """" & "Text" & """" & " SIZE=" & """" & "6" & """" & " MAXLENGTH=" & """" & "7" & """" & " VALUE=" & """" & "0" & """" & ">")
 Response.Write("</TD>")
 Response.Write("<TH VALIGN=" & """" & "Center" & """" & " ALIGN=" & """" & "Right" & """" & ">")
 Response.Write("Characters Remaining:")
 Response.Write("</TH>")
 Response.Write("<TD VALIGN=" & """" & "Center" & """" & " ALIGN=" & """" & "Left" & """" & ">")
 Response.Write("<INPUT NAME=" & """" & "charLeft" & """" & " TYPE=" & """" & "Text" & """" & " SIZE=" & """" & "6" & """" & " MAXLENGTH=" & """" & "7" & """" & " VALUE=" & """" & "2000" & """" & ">")
 Response.Write("</TD>")
 Response.Write("<TR>")
 Response.Write("<TD ALIGN=" & """" & "Center" & """" & " VALIGN=" & """" & "Center" & """" & "COLSPAN=4" & """" & ">")
 Response.Write("<TEXTAREA onKeyUp=" & """" & "countCharacters();" & """" & " NAME=" & """" & "Note" & """")
 Response.Write("ROWS=8 ")
 If (varScreenWidth > 900) Then
  Response.Write("COLS=90")
 Else
  Response.Write("COLS=72")
 End If
 Response.Write(" WRAP=Virtual></TEXTAREA>")
 Response.Write("</TD>")
 Response.Write("</TR>")
 Response.Write("<TR>")
 Response.Write("<TD ALIGN=" & """" & "Center" & """" & " VALIGN=" & """" & "Center" & """" & "COLSPAN=4" & """" & ">")
 If (Session("AuthorAliasID") <> Empty) Then
  Response.Write(" <INPUT CLASS=" & """" & "Button" & """" & " TYPE=" & """" & "Submit" & """" & " NAME=" & """")
  Response.Write("Signature" & """" &" VALUE=" & """" & "Leave SIGNED Note" & """" & ">" & vbcrlf)
 End If
 If (varNotesType <> "Signed") Then
  Response.Write("<INPUT CLASS=" & """" & "Button" & """" & " TYPE=" & """" & "Submit" & """" & " NAME=" & """")
  Response.Write("Signature" & """" & " VALUE=" & """" & "Leave UNSIGNED Note" & """" & ">")
 End If
 Response.Write(" <SELECT NAME=" & """" & "Type" & """" & ">")
 If ((varNotesType = "All") Or (varNotesType = "Signed")) Then
  Response.Write("<OPTION SELECTED VALUE=" & """" & "Public" & """" & ">Anyone can read this note</OPTION>")
  Response.Write("<OPTION VALUE=" & """" & "Signed" & """" & ">Logged in people can read this note</OPTION>")
  Response.Write("<OPTION VALUE=" & """" & "Friend" & """" & ">" & varAlias & "'s friends can read this note</OPTION>")
  Response.Write("<OPTION VALUE=" & """" & "Author" & """" & ">" & varAlias & " can read this note</OPTION>")
 End If
 If (varNotesType = "Friends") Then
  Response.Write("<OPTION SELECTED VALUE=" & """" & "Friend" & """" & ">")
  Response.Write(varAlias)
  Response.Write("'s friends can read this note</OPTION>")
  Response.Write("<OPTION VALUE=" & """" & "Author" & """" & ">" & varAlias & " can read this note</OPTION>")
 End If
 Response.Write("</SELECT>")
 Response.Write("</TD>")
 Response.Write(" </TR>")
 If (Session("AuthorAliasID") <> "") Then
  Set comm = Server.CreateObject("ADODB.Command")
  comm.ActiveConnection = "DSN=members_sql;UID=members;PWD=ecfcod3;"
  comm.CommandType = 4
  comm.CommandText = "DM_SP_CreateKeypair"
  ReDim params(1)
  params(0) = Session("AuthorAliasID")
  params(1) = "" & Session("AuthorAlias") & ""
  comm.Execute , params
  Set comm = Nothing
  Set comm = Server.CreateObject("ADODB.Command")
  Set rs = Server.CreateObject("ADODB.Recordset")
  comm.ActiveConnection = conn
  comm.CommandType = 4
  comm.CommandText = "DM_SP_SelectKey"
  comm.Execute , params(0)
  Set params(1) = Nothing
  Set params(0) = Nothing
  rs.Open comm
  If not rs.EOF Then
   Response.Write("<INPUT TYPE=" & """" & "Hidden" & """" & " NAME=" & """" & "Key" & """" & " VALUE=" & """")
   Response.Write(rs.Fields("PublicKey"))
   Response.Write("""" & ">")
  End If
  rs.Close
  Set rs = Nothing
  Set comm = Nothing
 End If
 Response.Write("</FORM>")
End If
%>
       </TABLE>
      </TD>
     </TR>
    </TABLE>
   </TD>
  </TR>
 
           </p>
               
           </p>  </FONT></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
 
 <tr>
   <td class="btfoot">
     <div align="center"><FONT face=Verdana>) 2002 Teen Writing Net. All rights reserved. Page design by </FONT>  
                  <!--#include file = "footer.xhtml"-->  <br>
                       
         <a href="http://www.teenwriting.net" target="_blank"><FONT
     face=Verdana>TEEN WRITING NET</FONT> </FONT></a><FONT
     face=Verdana>.</FONT></FONT></div></td></tr></table></FONT>
</body>
</html>
<%
ReDim params(1)
params(0) = Request("EntryID")
params(1) = varStatus
Set comm = Server.CreateObject("ADODB.Command")
comm.ActiveConnection = "DSN=members_sql;UID=members;PWD=ecfcod3;"
comm.CommandType = 4
comm.CommandText = "DM_SP_IncrementEntry"
comm.Execute , params
Set params(1) = Nothing
Set params(0) = Nothing
Set comm = Nothing
%>

Regards,
Wakie.
0
 

Author Comment

by:mtrxpoet
ID: 8080862
Wakie,

tried that, still not working right. thanks anyways. also points increased again
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 8080967
What is this?

Set comm = Server.CreateObject("ADODB.Command")
  Set rs = Server.CreateObject("ADODB.Recordset")
  comm.ActiveConnection = conn
  comm.CommandType = 4
  comm.CommandText = "DM_SP_SelectKey"
  comm.Execute , params(0)
  Set params(1) = Nothing
  Set params(0) = Nothing


No offense, but this is really ugly code, the whole script is bad... :-/
0
 

Author Comment

by:mtrxpoet
ID: 8081427
i'm not even sure what all it is! thats the worst part, lol. my partner wrote alot of it then a friend helped him out as well. he's in the marines now thou.
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 8081809
Well... being ex Navy, I can go on and on about the IQ level of Marines... ;-)

But anyway, just looking at this;
comm.Execute , params(0)
makes me want to tell you to just start over...
0
 

Author Comment

by:mtrxpoet
ID: 8084045
lol. hey i'm navy too, nuclear ET. but i would start over if i knew what i had to do, lol
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 8084201
I was an AT for 8 years, gettimg ready to go back into the reserves though...

As for starting over, do it in steps, figure out what the end result is suppose to do, then write the code 1 page at a time.  Once you have a working solution, go back and fine tune or re-write for efficiency.
0
 

Author Comment

by:mtrxpoet
ID: 8092270
hey if my partner put this up with a couple 100 points. anyone be interested in writing it for us:-D
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 8092275
Sure... $40 an hour.  ;-)
0
 
LVL 4

Expert Comment

by:Wakie
ID: 8092356
lol... are we talking US or AU dollars? :oP

I'll offer to write it for you, but it would cost you more than 100 points I'm afraid.

If you are interested, please provide more information below or you can send me any of your files (compressed preferably) to wakie@telpacific.com.au.

Regards,
Wakie.
0
 

Author Comment

by:mtrxpoet
ID: 8093925
how many points/ dollars do you all think it would come out to?
0
 
LVL 4

Expert Comment

by:Wakie
ID: 8095858
Hi mtrxpoet,

I'm willing to negotiate on the points. But would advise allocating enough to cover the level of difficulty of the job you have requested.

Regards,
Wakie.
0
 

Author Comment

by:mtrxpoet
ID: 8096355
well wakie,

how many would you want and we'll start from there
0
 
LVL 4

Expert Comment

by:Wakie
ID: 8096374
I'd say you'd be looking at around 250 points.
0
 

Author Comment

by:mtrxpoet
ID: 8096561
my partners got 390, he's agreed to give you the points for it, plus the 75 from this ? (he's gotta close out his account anyways) up for the job?
0
 
LVL 4

Accepted Solution

by:
Wakie earned 400 total points
ID: 8096683
Sure, no problem at all.

Email me the database, any scripts you want rewritten and any helpful information - wakie@telpacific.com.au.

Regards,
Wakie.
0
 

Author Comment

by:mtrxpoet
ID: 8096982
all sent and ready for ya ;) thanks a ton
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 8100404
LOL!!!  I'll give you 5000 points to write this!

It's not a matter of points, it's a matter of time and effort.

8 hours @ $40 hr...  Minimum.
0
 

Author Comment

by:mtrxpoet
ID: 8100834
lol good one mgfranz. but i don't have that money. i work hard for the money i do get and working in the U.S. Navy it's very little money at that. everything has been paid outa my pocket so far and otherwise been donated. otherwise i would gladly pay 320 (min.) for your time. thanks anyways,

mtrxpoet
0
 

Expert Comment

by:smackredbaron
ID: 8862653
Not sure if you've already solved the problem, but if not, I believe it's related to encountering a null value in the database. I recently created a page which fills in 3 columns in a table with thumbnails within a While rs.EOF <> TRUE -- but if the 2nd or 3rd column happens upon the end of file (before it reaches then end of the while loop), it displays the error message:

"error '80020009'
Exception occurred."

I saw a solution using IsNotNull, but need to look it up again to fix my problem (or else make sure the total # of thumbnails is always divisible by 3).
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question