mtrxpoet
asked on
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
when i load my page i get this error and i don't know what it's from:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure 'DM_SP_SelectCountEntries' expects parameter '@varRelationship', which was not supplied.
/toc.asp, line 347
this is the 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-classificat ion" 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','Mond ay','Mon', 'Tuesday','Tue', 'Wednesday','Wed','Thursda y','Thr',' Friday','F ri','Satur day','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.getM onth()+1:m onth[t.get Month()*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.getFullYe ar():t.get FullYear() .toString( ).substrin g(2);break ;
case "W":str+=tday[t.getDay()*2 +Number(a1 )];break; default: str+=unescape(a[i]);}}retu rn 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> </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@t eenwriting .net">sugg estions</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","D 0",",%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@t eenwriting .net">emai l 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>
<%
Dim varPageName
Dim varAuthorID
Dim varLoadTOC
Dim varAlias,varDiaryType,varD iaryTitle, varDiaryDe scription
varDiaryDescription = Empty
varPageName = "TOC"
varAuthorID = Request("AuthorAliasID")
varLoadTOC = True
%>
<!--#include file = "security.inc"-->
<!--#include file = "ensureconnection.inc"-->
<!--#include file = "checkstatus.inc"-->
<!--#include file = "preferences.inc"-->
<!--#include file = "stringreplace.inc"-->
<%
Set comm = Server.CreateObject("ADODB .Command")
Set rs = Server.CreateObject("ADODB .Recordset ")
comm.ActiveConnection = "DSN=members_sql;UID=membe rs;PWD=ecf cod3;"
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectDiaryDescript ion"
comm.Execute, Request("AuthorAliasID")
rs.Open comm
If ((rs.EOF = False) And (rs.BOF = False)) Then
varAlias = rs.Fields("Alias")
varDiaryType = rs.Fields("DiaryType")
varDiaryTitle = rs.Fields("DiaryTitle")
varDiaryDescription = Replace(("" & rs.Fields("DiaryDescriptio n") & ""),vbcrlf,"<BR>" & vbcrlf)
If (Session("Javascript") = "None") Then
varDiaryDescription = ReplaceSens(varDiaryDescri ption,"<sc ript","<xx xxxx",1)
varDiaryDescription = ReplaceSens(varDiaryDescri ption,"lan guage=","x xxxxxxxx", 1)
End If
If (Session("AllowMusic") = "None") Then
varDiaryDescription = ReplaceSens(varDiaryDescri ption,"<bg sound","<x xxxxxx",1)
varDiaryDescription = ReplaceSens(varDiaryDescri ption,"<em bed","<xxx xx",1)
End If
If (Session("BackgroundImages ") = "None") Then
varDiaryDescription = ReplaceSens(varDiaryDescri ption,"bac kground:", "xxxxxxxxx x:",1)
varDiaryDescription = ReplaceSens(varDiaryDescri ption,"bac kground=", "xxxxxxxxx x=",1)
varDiaryDescription = ReplaceSens(varDiaryDescri ption,"bac kground-", "xxxxxxxxx x-",1)
End If
If (Session("ImagesTOC") = "None") Then
varDiaryDescription = ReplaceSens(varDiaryDescri ption,"<im g ","<xxx",1)
ElseIf ((Session("ImagesTOC") = "Friends") And (varMyFriend <> "Friend")) Then
varDiaryDescription = ReplaceSens(varDiaryDescri ption,"<im g","<xxx", 1)
End If
End If
rs.Close
Set rs = Nothing
Set comm = Nothing
%><html>
<head>
<!--#include file = "stylesheet.inc"-->
<TITLE>
Welcome to <%=varAlias%>'s Diary<%If (Session("AuthorAlias") <> "") Then Response.Write(", " & Session("AuthorAlias"))%>
</TITLE>
<%
If (varStatus = "Author") Then
Response.Write("<SCRIPT LANGUAGE=" & """" & "JavaScript" & """" & ">" & vbcrlf)
Response.Write(" <!--" & vbcrlf)
Response.Write(" function confirm_delete(){" & vbcrlf)
Response.Write(" var password = prompt(" & """" & "To delete your diary, please enter your password and click OK" & """" & "," & """" & """" & ");" & vbcrlf)
Response.Write(" if (password != " & """" & """" & " && password != null){" & vbcrlf)
Response.Write(" document.write(" & """" & "<FORM NAME=DeleteDiary METHOD=Post ACTION=deletediary.asp>" & """" & ");" & vbcrlf)
Response.Write(" document.write(" & """" & "<INPUT NAME=Password TYPE=Hidden MAXLENGTH=10 VALUE=" & """" & " + password + " & """" & ">" & """" & ");" & vbcrlf)
Response.Write(" document.write(" & """" & "</FORM>" & """" & ")" & vbcrlf)
Response.Write(" document.DeleteDiary.submi t();" & vbcrlf)
Response.Write(" }" & vbcrlf)
Response.Write(" }" & vbcrlf)
Response.Write(" -->" & vbcrlf)
Response.Write("</SCRIPT>" & vbcrlf)
End If
%>
<TD VALIGN="Top" ALIGN="Center" COLSPAN="1" NAME="RightMenu" ID="RightMenu" WIDTH="25%" CLASS="MenuRight">
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="1" >
<%
If (varIsIgnore = True) Then
Response.Write("<TR><TD>")
Response.Write("Sorry, but " & varAlias & " is ignoring you")
Response.Write("</TD></TR> ")
varLoadTOC = False
ElseIf (varMyIgnore = True) Then
Response.Write("<TR><TD>")
Response.Write("You are ignoring " & varAlias)
Response.Write("</TD></TR> ")
varLoadTOC = False
ElseIf ((varDiaryType = "Private") And (varStatus <> "Author")) Then
Response.Write("<TR><TD>")
Response.Write("Sorry, only " & varAlias & " can read this diary")
Response.Write("</TD></TR> ")
varLoadTOC = False
ElseIf ((varDiaryType = "Friends") And (varStatus <> "Friend") And (varStatus <> "Author")) Then
Response.Write("<TR><TD>")
Response.Write("Sorry, only people on " & varAlias & "'s friends list can read this diary")
Response.Write("</TD></TR> ")
varLoadTOC = False
ElseIf ((varDiaryType = "Signed") And (varStatus = "Unsigned")) Then
Response.Write("<TR><TD>")
Response.Write("Sorry, but " & varAlias & " only allows people who are logged in to read this diary")
Response.Write("</TD></TR> ")
varLoadTOC = False
ElseIf (varStatus = "Invisible") Then
If (Request.ServerVariables(" HTTP_REFER ER") <> "") Then
Response.Redirect(Request. ServerVari ables("HTT P_REFERER" ))
Else
Response.Redirect("/")
End If
End If
If (varLoadTOC = True) Then
ReDim params(2)
params(1) = Request("AuthorAliasID")
params(0) = int(Session("AuthorAliasID "))
params(2) = int(Request("Limit"))
Set comm = Server.CreateObject("ADODB .Command")
Set rs = Server.CreateObject("ADODB .Recordset ")
comm.ActiveConnection = "DSN=members_sql;UID=membe rs;PWD=ecf cod3;"
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectTOC"
comm.Execute , params
Set params(2) = Nothing
Set params(1) = Nothing
Set params(0) = Nothing
rs.Open comm
If ((rs.EOF = False) And (rs.BOF = False)) Then
Do While Not rs.EOF
Response.Write("<TR><TD>")
Response.Write("<SPAN CLASS=" & """" & "TOC" & """" & ">")
Response.Write(" <SMALL>(")
Response.Write(rs.Fields(" Number"))
Response.Write(")</SMALL>" )
Response.Write("</TD><TD>" )
Response.Write("<A HREF=" & """" & "entry.asp?EntryID=")
Response.Write(rs.Fields(" EntryID"))
Response.Write("""" & ">")
If (rs.Fields("EntryType") = "Private") Then
Response.Write("<B>P</B> - ")
ElseIf (rs.Fields("EntryType") = "Friends") Then
Response.Write("<B>F</B> - ")
End If
If (rs.Fields("Title") <> "") Then
Response.Write(rs.Fields(" Title"))
Else
Response.Write(rs.Fields(" EntryID"))
End If
Response.Write("</A>")
Response.Write("</TD><TD>" )
Response.Write("<SPAN CLASS=" & """" & "TOC" & """" & ">")
Response.Write(" <SMALL>")
Response.Write(FormatDateT ime(rs.Fie lds("Autho rDateCreat ed"),2))
Response.Write("</SMALL>")
Response.Write("<BR>")
Response.Write("</TD></TR> ")
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
Set comm = Nothing
Response.Write("<TR><TD COLSPAN=" & """" & "3" & """" & ">")
Set comm = Server.CreateObject("ADODB .Command")
Set rs = Server.CreateObject("ADODB .Recordset ")
Dim intIndex
comm.ActiveConnection = "DSN=members_sql;UID=membe rs;PWD=ecf cod3;"
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectCountEntries"
comm.Parameters.Append comm.CreateParameter ("@varAliasID",3,1,3,Reque st("Author AliasID"))
comm.Parameters.Append comm.CreateParameter ("@varRelationship",200,1, 8,varStatu s)
comm.Parameters.Append comm.CreateParameter ("@NumberOfEntries",3,4,3, Empty)
comm.Parameters.Append comm.CreateParameter ("@NumberOfTables",3,4,3,E mpty)
comm.Parameters.Append comm.CreateParameter ("@NumberOfLeftovers",3,4, 3,Empty)
comm.Execute
If (comm.Parameters("@NumberO fTables") > 0) Then
Response.Write("<BR>")
If (Request("Limit") <> "") Then
Response.Write("<A HREF=" & """" & "toc.asp?AuthorAliasID=" & Request("AuthorAliasID") & """" & ">")
Response.Write("Most Recent Entries")
Response.Write("</A>")
End If
For intIndex = 1 to comm.Parameters("@NumberOf Tables")-1
Response.Write("<BR>")
If (int(Request("Limit")) <> comm.Parameters("@NumberOf Entries") - (intIndex * 50)) Then
Response.Write("<A HREF=" & """" & "toc.asp?AuthorAliasID=" & Request("AuthorAliasID"))
Response.Write("&" & "Limit=" & (comm.Parameters("@NumberO fEntries") - (intIndex * 50)) & """")
Response.Write(">Entries " & ((comm.Parameters("@Number OfEntries" ) - ((intIndex + 1) * 50)) + 1) & " to ")
Response.Write((comm.Param eters("@Nu mberOfEntr ies") - (intIndex * 50)))
Response.Write("</A>")
Else
Response.Write("Entries " & ((comm.Parameters("@Number OfEntries" ) - ((intIndex + 1) * 50)) + 1) & " to ")
Response.Write((comm.Param eters("@Nu mberOfEntr ies") - (intIndex * 50)))
End If
Next
Response.Write("<BR>")
Response.Write("<A HREF=" & """" & "toc.asp?AuthorAliasID=" & Request("AuthorAliasID"))
Response.Write("&" & "Limit=" & comm.Parameters("@NumberOf Leftovers" ) & """")
Response.Write(">Entries 1 to " & comm.Parameters("@NumberOf Leftovers" ))
End If
Set rs = Nothing
Set comm = Nothing
Response.Write("</TD></TR> ")
End If
%>
</TABLE>
</TD>
</TR>
</p>
</p> </FONT></TD></TR></TBODY>< /TABLE></T D></TR></T BODY></TAB LE>
<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></FON T></div></ td></tr></ table></FO NT>
</body>
</html>
thanks alot!
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure 'DM_SP_SelectCountEntries'
/toc.asp, line 347
this is the 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-classificat
<meta name="rating" content="general">
<meta name="language" content="EN">
<script language="JavaScript">
function doClock(){
var t=new Date(),a=doClock.arguments
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','Mond
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.getM
case "D": if ((Number(a1)==1) && (t.getDate()<10)) str+="0";str+=t.getDate();
case "Y": str+=(a1=='0')?t.getFullYe
case "W":str+=tday[t.getDay()*2
}
</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>
</td>
<td class="btnav" height="20" width="16%">
<div align="center"><a href="http://songs.teenwriting.net"><FONT
face=Verdana>Songs</FONT><
</td>
<td class="btnav" height="20" width="15%">
<div align="center"><A href="http://stories.teenwriting.net"><FONT face=Verdana>Stories</FONT
</td>
<td class="btnav" height="20" width="17%">
<div align="center"><A href="http://essay.teenwriting.net"><FONT face=Verdana>Essay</FONT><
</td>
<td class="btnav" height="20" width="17%">
<div align="center"><A href="http://fiction.teenwriting.net"><FONT face=Verdana>Fiction</FONT
</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> </FONT>
<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@t
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
</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@t
</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>
</td>
<td valign="top" width="64%" height="433">
<p><br><FONT
face=Verdana>
<p>
<!--#include file = "header.xhtml"--><br>
<%
Dim varPageName
Dim varAuthorID
Dim varLoadTOC
Dim varAlias,varDiaryType,varD
varDiaryDescription = Empty
varPageName = "TOC"
varAuthorID = Request("AuthorAliasID")
varLoadTOC = True
%>
<!--#include file = "security.inc"-->
<!--#include file = "ensureconnection.inc"-->
<!--#include file = "checkstatus.inc"-->
<!--#include file = "preferences.inc"-->
<!--#include file = "stringreplace.inc"-->
<%
Set comm = Server.CreateObject("ADODB
Set rs = Server.CreateObject("ADODB
comm.ActiveConnection = "DSN=members_sql;UID=membe
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectDiaryDescript
comm.Execute, Request("AuthorAliasID")
rs.Open comm
If ((rs.EOF = False) And (rs.BOF = False)) Then
varAlias = rs.Fields("Alias")
varDiaryType = rs.Fields("DiaryType")
varDiaryTitle = rs.Fields("DiaryTitle")
varDiaryDescription = Replace(("" & rs.Fields("DiaryDescriptio
If (Session("Javascript") = "None") Then
varDiaryDescription = ReplaceSens(varDiaryDescri
varDiaryDescription = ReplaceSens(varDiaryDescri
End If
If (Session("AllowMusic") = "None") Then
varDiaryDescription = ReplaceSens(varDiaryDescri
varDiaryDescription = ReplaceSens(varDiaryDescri
End If
If (Session("BackgroundImages
varDiaryDescription = ReplaceSens(varDiaryDescri
varDiaryDescription = ReplaceSens(varDiaryDescri
varDiaryDescription = ReplaceSens(varDiaryDescri
End If
If (Session("ImagesTOC") = "None") Then
varDiaryDescription = ReplaceSens(varDiaryDescri
ElseIf ((Session("ImagesTOC") = "Friends") And (varMyFriend <> "Friend")) Then
varDiaryDescription = ReplaceSens(varDiaryDescri
End If
End If
rs.Close
Set rs = Nothing
Set comm = Nothing
%><html>
<head>
<!--#include file = "stylesheet.inc"-->
<TITLE>
Welcome to <%=varAlias%>'s Diary<%If (Session("AuthorAlias") <> "") Then Response.Write(", " & Session("AuthorAlias"))%>
</TITLE>
<%
If (varStatus = "Author") Then
Response.Write("<SCRIPT LANGUAGE=" & """" & "JavaScript" & """" & ">" & vbcrlf)
Response.Write(" <!--" & vbcrlf)
Response.Write(" function confirm_delete(){" & vbcrlf)
Response.Write(" var password = prompt(" & """" & "To delete your diary, please enter your password and click OK" & """" & "," & """" & """" & ");" & vbcrlf)
Response.Write(" if (password != " & """" & """" & " && password != null){" & vbcrlf)
Response.Write(" document.write(" & """" & "<FORM NAME=DeleteDiary METHOD=Post ACTION=deletediary.asp>" & """" & ");" & vbcrlf)
Response.Write(" document.write(" & """" & "<INPUT NAME=Password TYPE=Hidden MAXLENGTH=10 VALUE=" & """" & " + password + " & """" & ">" & """" & ");" & vbcrlf)
Response.Write(" document.write(" & """" & "</FORM>" & """" & ")" & vbcrlf)
Response.Write(" document.DeleteDiary.submi
Response.Write(" }" & vbcrlf)
Response.Write(" }" & vbcrlf)
Response.Write(" -->" & vbcrlf)
Response.Write("</SCRIPT>"
End If
%>
<TD VALIGN="Top" ALIGN="Center" COLSPAN="1" NAME="RightMenu" ID="RightMenu" WIDTH="25%" CLASS="MenuRight">
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="1" >
<%
If (varIsIgnore = True) Then
Response.Write("<TR><TD>")
Response.Write("Sorry, but " & varAlias & " is ignoring you")
Response.Write("</TD></TR>
varLoadTOC = False
ElseIf (varMyIgnore = True) Then
Response.Write("<TR><TD>")
Response.Write("You are ignoring " & varAlias)
Response.Write("</TD></TR>
varLoadTOC = False
ElseIf ((varDiaryType = "Private") And (varStatus <> "Author")) Then
Response.Write("<TR><TD>")
Response.Write("Sorry, only " & varAlias & " can read this diary")
Response.Write("</TD></TR>
varLoadTOC = False
ElseIf ((varDiaryType = "Friends") And (varStatus <> "Friend") And (varStatus <> "Author")) Then
Response.Write("<TR><TD>")
Response.Write("Sorry, only people on " & varAlias & "'s friends list can read this diary")
Response.Write("</TD></TR>
varLoadTOC = False
ElseIf ((varDiaryType = "Signed") And (varStatus = "Unsigned")) Then
Response.Write("<TR><TD>")
Response.Write("Sorry, but " & varAlias & " only allows people who are logged in to read this diary")
Response.Write("</TD></TR>
varLoadTOC = False
ElseIf (varStatus = "Invisible") Then
If (Request.ServerVariables("
Response.Redirect(Request.
Else
Response.Redirect("/")
End If
End If
If (varLoadTOC = True) Then
ReDim params(2)
params(1) = Request("AuthorAliasID")
params(0) = int(Session("AuthorAliasID
params(2) = int(Request("Limit"))
Set comm = Server.CreateObject("ADODB
Set rs = Server.CreateObject("ADODB
comm.ActiveConnection = "DSN=members_sql;UID=membe
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectTOC"
comm.Execute , params
Set params(2) = Nothing
Set params(1) = Nothing
Set params(0) = Nothing
rs.Open comm
If ((rs.EOF = False) And (rs.BOF = False)) Then
Do While Not rs.EOF
Response.Write("<TR><TD>")
Response.Write("<SPAN CLASS=" & """" & "TOC" & """" & ">")
Response.Write(" <SMALL>(")
Response.Write(rs.Fields("
Response.Write(")</SMALL>"
Response.Write("</TD><TD>"
Response.Write("<A HREF=" & """" & "entry.asp?EntryID=")
Response.Write(rs.Fields("
Response.Write("""" & ">")
If (rs.Fields("EntryType") = "Private") Then
Response.Write("<B>P</B> - ")
ElseIf (rs.Fields("EntryType") = "Friends") Then
Response.Write("<B>F</B> - ")
End If
If (rs.Fields("Title") <> "") Then
Response.Write(rs.Fields("
Else
Response.Write(rs.Fields("
End If
Response.Write("</A>")
Response.Write("</TD><TD>"
Response.Write("<SPAN CLASS=" & """" & "TOC" & """" & ">")
Response.Write(" <SMALL>")
Response.Write(FormatDateT
Response.Write("</SMALL>")
Response.Write("<BR>")
Response.Write("</TD></TR>
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
Set comm = Nothing
Response.Write("<TR><TD COLSPAN=" & """" & "3" & """" & ">")
Set comm = Server.CreateObject("ADODB
Set rs = Server.CreateObject("ADODB
Dim intIndex
comm.ActiveConnection = "DSN=members_sql;UID=membe
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectCountEntries"
comm.Parameters.Append comm.CreateParameter ("@varAliasID",3,1,3,Reque
comm.Parameters.Append comm.CreateParameter ("@varRelationship",200,1,
comm.Parameters.Append comm.CreateParameter ("@NumberOfEntries",3,4,3,
comm.Parameters.Append comm.CreateParameter ("@NumberOfTables",3,4,3,E
comm.Parameters.Append comm.CreateParameter ("@NumberOfLeftovers",3,4,
comm.Execute
If (comm.Parameters("@NumberO
Response.Write("<BR>")
If (Request("Limit") <> "") Then
Response.Write("<A HREF=" & """" & "toc.asp?AuthorAliasID=" & Request("AuthorAliasID") & """" & ">")
Response.Write("Most Recent Entries")
Response.Write("</A>")
End If
For intIndex = 1 to comm.Parameters("@NumberOf
Response.Write("<BR>")
If (int(Request("Limit")) <> comm.Parameters("@NumberOf
Response.Write("<A HREF=" & """" & "toc.asp?AuthorAliasID=" & Request("AuthorAliasID"))
Response.Write("&" & "Limit=" & (comm.Parameters("@NumberO
Response.Write(">Entries " & ((comm.Parameters("@Number
Response.Write((comm.Param
Response.Write("</A>")
Else
Response.Write("Entries " & ((comm.Parameters("@Number
Response.Write((comm.Param
End If
Next
Response.Write("<BR>")
Response.Write("<A HREF=" & """" & "toc.asp?AuthorAliasID=" & Request("AuthorAliasID"))
Response.Write("&" & "Limit=" & comm.Parameters("@NumberOf
Response.Write(">Entries 1 to " & comm.Parameters("@NumberOf
End If
Set rs = Nothing
Set comm = Nothing
Response.Write("</TD></TR>
End If
%>
</TABLE>
</TD>
</TR>
</p>
</p> </FONT></TD></TR></TBODY><
<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></FON
</body>
</html>
thanks alot!
ASKER
alright i've narrowed it down to this:
Scenario 5 - Mismatched CommandTypeEnum value
When opening a recordset you can pass an optional CommandTypeEnum value (eg adCmdText, adCmdTable or adCmdStoredProc) to ADO to help it identify the source of your data. If you choose to specify a database table as your data source, but pass the CommandTypeEnum value for adCmdText, then you will receive the following error message. Either change the CommandTypeEnum to adCmdTable or adCmdTableDirect -or- use an SQL query as the source of your recordset.
Microsoft JET Database Engine (0x80040E14)
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
but i still don't know how i would go about fixxing it. i don't see where it would be
Scenario 5 - Mismatched CommandTypeEnum value
When opening a recordset you can pass an optional CommandTypeEnum value (eg adCmdText, adCmdTable or adCmdStoredProc) to ADO to help it identify the source of your data. If you choose to specify a database table as your data source, but pass the CommandTypeEnum value for adCmdText, then you will receive the following error message. Either change the CommandTypeEnum to adCmdTable or adCmdTableDirect -or- use an SQL query as the source of your recordset.
Microsoft JET Database Engine (0x80040E14)
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
but i still don't know how i would go about fixxing it. i don't see where it would be
mtrxpoet,
I think you setting two comm object at the same time... Try to remarks this lines and check the result...
Set comm = Server.CreateObject("ADODB .Command")
Set rs = Server.CreateObject("ADODB .Recordset ")
Dim intIndex
comm.ActiveConnection = "DSN=members_sql;UID=membe rs;PWD=ecf cod3;"
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectCountEntries"
comm.Parameters.Append comm.CreateParameter ("@varAliasID",3,1,3,Reque st("Author AliasID"))
comm.Parameters.Append comm.CreateParameter ("@varRelationship",200,1, 8,varStatu s)
comm.Parameters.Append comm.CreateParameter ("@NumberOfEntries",3,4,3, Empty)
comm.Parameters.Append comm.CreateParameter ("@NumberOfTables",3,4,3,E mpty)
comm.Parameters.Append comm.CreateParameter ("@NumberOfLeftovers",3,4, 3,Empty)
comm.Execute
Or you can try this
Set comm1 = Server.CreateObject("ADODB .Command")
Set rs1 = Server.CreateObject("ADODB .Recordset ")
Dim intIndex
comm1.ActiveConnection = "DSN=members_sql;UID=membe rs;PWD=ecf cod3;"
comm1.CommandType = 4
comm1.CommandText = "DM_SP_SelectCountEntries"
...
comm1.Execute
I think you setting two comm object at the same time... Try to remarks this lines and check the result...
Set comm = Server.CreateObject("ADODB
Set rs = Server.CreateObject("ADODB
Dim intIndex
comm.ActiveConnection = "DSN=members_sql;UID=membe
comm.CommandType = 4
comm.CommandText = "DM_SP_SelectCountEntries"
comm.Parameters.Append comm.CreateParameter ("@varAliasID",3,1,3,Reque
comm.Parameters.Append comm.CreateParameter ("@varRelationship",200,1,
comm.Parameters.Append comm.CreateParameter ("@NumberOfEntries",3,4,3,
comm.Parameters.Append comm.CreateParameter ("@NumberOfTables",3,4,3,E
comm.Parameters.Append comm.CreateParameter ("@NumberOfLeftovers",3,4,
comm.Execute
Or you can try this
Set comm1 = Server.CreateObject("ADODB
Set rs1 = Server.CreateObject("ADODB
Dim intIndex
comm1.ActiveConnection = "DSN=members_sql;UID=membe
comm1.CommandType = 4
comm1.CommandText = "DM_SP_SelectCountEntries"
...
comm1.Execute
Your not setting varStatus anywhere that could be the problem.
Fracture
Fracture
ASKER
how do u set var status?
?? I assume this is your code as well and your setting it here but not in the code above
https://www.experts-exchange.com/questions/20418314/ADODB-Command-error-'800a0e7c'-urgent.html
https://www.experts-exchange.com/questions/20418314/ADODB-Command-error-'800a0e7c'-urgent.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thats my partner. he's been working on the other part of the site and doing work while i'm at sea (u.s. navy) so of course it's been several months since i've done any of this. but now he's gone for training in the marines so he'll be gone for a few months. i've tried using the examples the people have givin me but still nothing. and i just can't figure out what i'm doing wrong!
In this line of code
'comm.Parameters.Append comm.CreateParameter
("@varRelationship",200,1, 8,varStatu s)
you are not passing the Db anything because no where on the page has varStatus been set.
Under this line(about340): Dim intIndex
Write this:
Dim varStatus
varStatus="Author"
Does it still give same error?
'comm.Parameters.Append comm.CreateParameter
("@varRelationship",200,1,
you are not passing the Db anything because no where on the page has varStatus been set.
Under this line(about340): Dim intIndex
Write this:
Dim varStatus
varStatus="Author"
Does it still give same error?
ASKER
ok fracture that worked so far. now thou i get an error that is the same error number but it said there are Too many arguments were supplied for procedure DM_SP_SelectCountEntries
Can you post DM_SP_SelectCountEntries ?
ASKER
this is my dp_sp_selectcountentries
CREATE PROCEDURE DM_SP_SelectCountEntries @varAliasID int, @varRelationship varchar(8), @outNumberOfEntries int OUTPUT, @outNumberOfTables int OUTPUT, @outNumberOfLeftovers int OUTPUT AS
IF @varRelationship = 'Author'
SELECT @outNumberOfEntries = COUNT(*) FROM TableEntries WHERE AliasID = @varAliasID
IF @varRelationship = 'Friend'
SELECT @outNumberOfEntries = COUNT(*) FROM TableEntries WHERE AliasID = @varAliasID AND EntryType <> 'Private'
IF @varRelationship = 'Signed'
SELECT @outNumberOfEntries = COUNT(*) FROM TableEntries WHERE AliasID = @varAliasID AND EntryType <> 'Private' AND EntryType <> 'Friends'
IF @varRelationship = 'Unsigned'
SELECT @outNumberOfEntries = COUNT(*) FROM TableEntries WHERE AliasID = @varAliasID AND EntryType = 'Public'
SET @outNumberOfTables = @outNumberOfEntries / 50
SET @outNumberOfLeftovers = (@outNumberOfEntries - (@outNumberOfTABLES * 50))
GO
CREATE PROCEDURE DM_SP_SelectCountEntries @varAliasID int, @varRelationship varchar(8), @outNumberOfEntries int OUTPUT, @outNumberOfTables int OUTPUT, @outNumberOfLeftovers int OUTPUT AS
IF @varRelationship = 'Author'
SELECT @outNumberOfEntries = COUNT(*) FROM TableEntries WHERE AliasID = @varAliasID
IF @varRelationship = 'Friend'
SELECT @outNumberOfEntries = COUNT(*) FROM TableEntries WHERE AliasID = @varAliasID AND EntryType <> 'Private'
IF @varRelationship = 'Signed'
SELECT @outNumberOfEntries = COUNT(*) FROM TableEntries WHERE AliasID = @varAliasID AND EntryType <> 'Private' AND EntryType <> 'Friends'
IF @varRelationship = 'Unsigned'
SELECT @outNumberOfEntries = COUNT(*) FROM TableEntries WHERE AliasID = @varAliasID AND EntryType = 'Public'
SET @outNumberOfTables = @outNumberOfEntries / 50
SET @outNumberOfLeftovers = (@outNumberOfEntries - (@outNumberOfTABLES * 50))
GO
Ok I dont create parameters the same way as you in my code but would there be a problem with naming them differently to the ones in the Stored Proc?
If not:
Check out this link
http://vyaskn.tripod.com/repl_ans2.htm#toomany
Fracture
PS In this code
SET @outNumberOfTables = @outNumberOfEntries / 50
SET @outNumberOfLeftovers = (@outNumberOfEntries - (@outNumberOfTABLES * 50))
the @outNumberOfLeftovers is always going to be 0 so you dont need SQL Server to do this :)
If not:
Check out this link
http://vyaskn.tripod.com/repl_ans2.htm#toomany
Fracture
PS In this code
SET @outNumberOfTables = @outNumberOfEntries / 50
SET @outNumberOfLeftovers = (@outNumberOfEntries - (@outNumberOfTABLES * 50))
the @outNumberOfLeftovers is always going to be 0 so you dont need SQL Server to do this :)
Ok I dont create parameters the same way as you in my code but would there be a problem with naming them differently to the ones in the Stored Proc?
If not:
Check out this link
http://vyaskn.tripod.com/repl_ans2.htm#toomany
Fracture
PS In this code
SET @outNumberOfTables = @outNumberOfEntries / 50
SET @outNumberOfLeftovers = (@outNumberOfEntries - (@outNumberOfTABLES * 50))
the @outNumberOfLeftovers is always going to be 0 so you dont need SQL Server to do this :)
If not:
Check out this link
http://vyaskn.tripod.com/repl_ans2.htm#toomany
Fracture
PS In this code
SET @outNumberOfTables = @outNumberOfEntries / 50
SET @outNumberOfLeftovers = (@outNumberOfEntries - (@outNumberOfTABLES * 50))
the @outNumberOfLeftovers is always going to be 0 so you dont need SQL Server to do this :)
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept Answer by gladxml
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
GaryC123
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
Accept Answer by gladxml
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
GaryC123
EE Cleanup Volunteer
try to check out the link might help...
http://www.adopenstatic.com/faq/80040e14.asp