Subject: Microsoft JET Database Engine error '80040e14'
Posted By: aprnip Post Date: 11/11/2004 7:40:02 PM
I got this error above when I try my script!!! Wat is missing the full error i got is this
Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression ''stress stress stress. i'm going crazy liao','11/12/2004 7:33:29 AM', false)'.

/revolnip/Discussion/pm.asp, line 48

What is my missing operator??? where???

Below is my script, can someone help this is urgent!!!

<% Option Explicit
dim lngTimer
lngTimer = Timer
%>
<!--#include file="Connect.asp" -->
<!--#include file="Settings.asp" -->
<!--#include file="Common.asp" -->

<% Dim ERRORMSG, i, recip, content, topic, POST_HTML, POST_BB, POST_SMILIE, POST_IMG
if not intUID = 0 then Conn.Execute("UPDATE [Users] SET [LastActivePlace] = ""pm.asp?mode=" & Request("mode") & """, [LastLoggedIn]= now()+0.5, [IP] = '" & GetIP & "' WHERE [uID]=" & intUID)
dim del
del = Request("Delete")
if del <> "" then 'if user wants to delete a PM
Conn.Execute("DELETE FROM [PM] WHERE pmID = " & del & " AND Recipient = " & intUID)
response.redirect "pm.asp?Message=Deleted+A+Message+Sucsessfully"
end if
%>
<%
dim Recipient, postSubject, postContent
Recipient = Request("Recipient")
postSubject = Request("Title")
postContent = Request("Content")
if len(postSubject) > 50 then postSubject = left(postSubject, 47) & "..."

if Recipient <> "" and Request("post") = "now" and intUID <> 0 then 'would otherwise cause errors if the form hadn't been submitted - i.e. on first page load

Set rsUserFind = Conn.Execute("SELECT uID,uName FROM Users WHERE uName = '" & Recipient & "'")
    if rsUserFind.eof then
        ERRORMSG = "Can't find username"
    else
        Recipient = rsUserFind("uID")
        if postSubject = "" then postSubject = "[ No Title ]"
    POST_HTML = false
    POST_BB = true
    POST_SMILIE = true
    POST_IMG = true
%>
<!--#include file="FormatPM.asp" -->
<%
    end if
end if
if Request("Post") = "now" and ERRORMSG = "" then
Conn.Execute("INSERT INTO [PM] ([Recipient],[Sender],[pmTitle],[Message],[SentDate],[Read]) VALUES (" & Recipient &_
"," & intUID & ",'" & postSubject & "','" & postContent & "','" & now()+0.5 & "', false)")
response.redirect "pm.asp?Message=Sent+PM+To+" & Request("Recipient")
end if
%>

Highlighted green is where the error is.

Reply By: rajanikrishna Reply Date: 11/11/2004 8:14:08 PM
Hello,

  Check the now() function. That table field is of date data type or text data type? and

last variable false ?????

In access, while inserting dates must enclosed in #...#


-----------
Rajani

Reply By: happygv Reply Date: 11/15/2004 1:06:12 AM
was this solved?

_________________________
- Vijay G
Strive for Perfection

Go to topic 22004

Return to index page 716
Return to index page 715
Return to index page 714
Return to index page 713
Return to index page 712
Return to index page 711
Return to index page 710
Return to index page 709
Return to index page 708
Return to index page 707