|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Jet Database Errorcode so I'm not sure what got deleted. Please Help! ERROR: Click on the sermon title to view it, or click the edit link to edit the content, or the delete link to delete the sermon. Microsoft JET Database Engine error '80040e14' Syntax error (missing operator) in query expression 'SermonDate DESCENDING'. /sermonlist.asp, line 37 CODE: <% Option Explicit Response.Buffer = True If Session("User") = "" then Session("FromPage") = "sermonlist.asp" Response.Redirect("Login.asp") End If dim cn, cmd, rs, DataPath, strSQL, TxtClr Response.Write("<html><head><title>Sermons</title></head><body><br><br>") Response.Write("<center>Click on the sermon title to view it, or click the edit link to edit the content, or the delete link to delete the sermon.</center><br><br>") DataPath = Server.MapPath("Calvary.mdb") DataPath = Replace(DataPath, "wwwroot", "Database") DataPath = Replace(DataPath, "\", "/") set cn = CreateObject("ADODB.Connection") cn.Provider = "Microsoft.Jet.OLEDB.4.0" cn.ConnectionTimeout = 40 cn.Open DataPath set cmd = CreateObject("ADODB.Command") cmd.ActiveConnection = cn set rs = CreateObject("ADODB.RecordSet") strSQL = "Select * From Sermons Order By SermonDate DESCENDING" cmd.CommandText = strSQL set rs = cmd.execute Response.Write("<table cellspacing='2' cellpadding = '3' align = 'center'>") Response.Write("<tr><th>Sermon Title</th><th>Sermon Date</th><th>Pastor Name</th><th>Edit</th><th>Delete</th></tr>") TxtClr = "#FFFFFF" Do While (Not rs.eof) If TxtClr = "#FFFFFF" Then TxtClr = "#CCCCCC" Else TxtClr = "#FFFFFF" End If Response.Write("<tr bgcolor = " & TxtClr & "><td><a href='view.asp?Name=" & Server.urlencode(rs("SermonTitle")) & "'>" & rs("SermonTitle") & "</a></td> ") Response.Write("<td><a href='edit_sermon.asp?Name=" &Response.Write("<td>" & rs("SermonDate") & "</td>") Response.Write("<td>" & rs("PastorName") & "</td>") server.urlencode(rs("SermonTitle")) & "'>Edit</a></td>") Response.Write("<td><a href='delete.asp?Name=" & server.urlencode( rs("SermonTitle")) & "'>Delete</a></td></tr>") rs.MoveNext Loop Response.Write("</table></body></html>") rs.close set rs = nothing set cmd = nothing cn.close set cn = nothing %> <pcd***@gmail.com> wrote in message
Show quoteHide quote news:1159980588.649811.194190@c28g2000cwb.googlegroups.com... [snip]> Here is the message I get when I clink on the link. I did write the > code so I'm not sure what got deleted. Please Help! > > ERROR: > > > Click on the sermon title to view it, or click the edit link to edit > the content, or the delete link to delete the sermon. > > > > Microsoft JET Database Engine error '80040e14' > > Syntax error (missing operator) in query expression 'SermonDate > DESCENDING'. > > /sermonlist.asp, line 37 You didn't tell us what database and version your using! However, try changing "DESCENDING" to "DESC". SQL ORDER BY http://www.w3schools.com/sql/sql_orderby.asp "McKirahan" <N***@McKirahan.com> wrote in message Sorry, didn't see the ".mdb" as it was after DESCENDING...news:xaudnQQa5fnrer7YnZ2dnUVZ_vSdnZ2d@comcast.com... > You didn't tell us what database and version your using! McKirahan wrote:
> "McKirahan" <N***@McKirahan.com> wrote in message Thanks DESC fixed it!> news:xaudnQQa5fnrer7YnZ2dnUVZ_vSdnZ2d@comcast.com... > > You didn't tell us what database and version your using! > > Sorry, didn't see the ".mdb" as it was after DESCENDING... Try ORDER BY SermonDate DESC ... sounds like JET doesn't like the full word.
Neither does SQL Server, by the way: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near 'DESCENDING'. Where did you find documentation that DESCENDING was a valid operator? Show quoteHide quote > strSQL = "Select * From Sermons Order By SermonDate DESCENDING"
Other interesting topics
How do I make sure that a asp page expires immediately and is not stored in the history ???
need bullet proof input validator How expensive is object instantication? 3-factor login system Restrict access by ip -2147217900:Syntax error in INSERT INTO statement. need help with regular expressions wrapper function Dynamic page Split, convert date question ?? Unable to connect to SQL Server database. |
|||||||||||||||||||||||