Forums

This topic is locked

Syntax error (missing operator) in query expressio

Posted 01 Jan 2006 05:49:52
1
has voted
01 Jan 2006 05:49:52 Malcolm X posted:


--------------------------------------------------------------------------------

Hey there, can anyone suggest why I am getting the following error.
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'TimberSpecies ='.
/html/results.asp, line 68

Line 68: Command1.Execute()

I have created the following command in a results.asp page.

UPDATE tblSpecies
SET fHits = fHits + 1
WHERE TimberSpecies = ParamSpecies

ParamSpecies Request.QueryString("TimberSpecies"

If it helps, I have a database with the following.

Table Name: tblSpecies
Column Names: idSpecies, TimberSpecies, fHits.

Also have included the code that Dreamweaver creates for the SQL.

<%
set Command1 = Server.CreateObject("ADODB.Command"
Command1.ActiveConnection = MM_connTimber_STRING
Command1.CommandText = "UPDATE tblSpecies SET fHits = fHits + 1 WHERE TimberSpecies = " + Replace(Command1__ParamSpecies, "'", "''" + " "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>

Thanks.
Mally.

Reply to this topic