Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update query won´t work

Status
Not open for further replies.

movium

Technical User
Feb 18, 2002
14
SE
Hi,
I´m starting to lose my mind on this problem I can´t find what´s wrong.

I´m creating a simple update procedure for an admin page. I followed a very basic tutorial on the web. I have problem at all to get the update to work when using the examples in the tutorial, but when reconfiguring my own pages something is dead wrong.

This is the error info I get from the server:

***********************
***********************

ODBC Error Code = 37000 (Syntax error or access violation)


[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''Allergi och stadsgrönska.' AUTHOR_GRFAKTA='Ann-Britt Sörensen och Mona Wembling' INTRO_GRFAKTA='''.


SQL = "UPDATE GRFAKTA SET YEAR_GRFAKTA=1995, NUMBER_GRFAKTA=3, TITLE_GRFAKTA='Allergi och stadsgrönska.' AUTHOR_GRFAKTA='Ann-Britt Sörensen och Mona Wembling' INTRO_GRFAKTA='' WHERE ID_GRFAKTA=41"

Data Source = "MOVIUM"


The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (1:1) to (1:51) in the template file C:\WebUtveckling\rubens.slu.se_3001_NiclasOstlund\webroot\websajten\admin\action_grfakta_edit.cfm.
***********************
***********************

The following is the query in the action page that updates:

***********************
***********************
<CFQUERY NAME=&quot;UPDATE_GRFAKTA&quot; DATASOURCE=&quot;movium&quot;>
UPDATE GRFAKTA
SET YEAR_GRFAKTA=#Form.YEAR_GRFAKTA#,
NUMBER_GRFAKTA=#Form.NUMBER_GRFAKTA#,
TITLE_GRFAKTA='#Form.TITLE_GRFAKTA#'
AUTHOR_GRFAKTA='#Form.AUTHOR_GRFAKTA#'
INTRO_GRFAKTA='#Form.INTRO_GRFAKTA#'
WHERE ID_GRFAKTA=#ID_GRFAKTA#
</CFQUERY>
***********************
***********************

Any ideas?

Regards
Niclas
 
You do not have any commas after some of your fields:

YEAR_GRFAKTA=#Form.YEAR_GRFAKTA#,
NUMBER_GRFAKTA=#Form.NUMBER_GRFAKTA#,
TITLE_GRFAKTA='#Form.TITLE_GRFAKTA#', <<<
AUTHOR_GRFAKTA='#Form.AUTHOR_GRFAKTA#', <<<<
INTRO_GRFAKTA='#Form.INTRO_GRFAKTA#'


(There should be one after TITLE_GRFAKTA and AUTHOR_GRFAKTA)
 
one more thing make sure you put your ## in ''. that may help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top