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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFUPDATE SCRIPT !! PLEASE HELP

Status
Not open for further replies.

kingjjx

Programmer
Sep 18, 2001
181
US
Hi, I am trying to write a ColdFusion update script.
I have successfully wrote the page that ads data to the databaase but everytime i make changes and click on submit, it gives me this error message: (MY SCRIPT IS BELOW)

Error Occurred While Processing Request
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect syntax near 'YEHS'.

The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (7:1) to (7:51).

**********************************************
MY SCRIPT LOOKS LIKE THIS :
RUNDATA IS THE TABLE NAME
DYNORUNEX IS THE DATABASE NAME

<CFQUERY NAME=&quot;EditDynorun&quot; DATASOURCE=&quot;DynoRunEX&quot;>

UPDATE RunData SET Model='#Model#','#mAKE#' ETC .. ETC .. WHERE PriKey=#PriKey#
</CFQUERY>


WHAT IS WRONG WITH THIS SCRIPT ??? PLEASE HELP ?
THANK YOU

 
Try setting each field that is to be updated to a value. For example:
UPDATE RunData SET Model='#Model#',
mAKE='#mAKE#',
ETC='#ETC#'
WHERE PriKey=#PriKey#
 
HEY .. THANKS A LOT .. FIXED THOSE 2 MINOR MISTAKES AND WORKED LIKE MAGIC.

AGAIN, THANK YOU
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top