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

UPDATE SCRIPT

Status
Not open for further replies.

kingjjx

Programmer
Joined
Sep 18, 2001
Messages
181
Location
US
Can someone please help me debug this script.
It keeps telling me this error below: (**'dfgdfgd' is a passed variable)
thank you
********************************

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

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 6: Incorrect syntax near 'dfgdfgd'.

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




<CFQUERY DATASOURCE=&quot;DynoRunEx&quot; NAME=&quot;UpdateDyno&quot;>
UPDATE RunData
SET Model='#Form.Model#',
Make='#Make#',
FirstYear='#FirstYear#',
LastYear='#LastYear#,
GenRunNotes='#GenRunNotes#',Run1Name='#Run1Name#',Run1Loc='#Run1Loc#',Run1Notes='#Run1Notes#',
Run2Name='#Run2Name#',Run2Loc='#Run2Loc#',Run2Notes='#Run2Notes#',Run3Name='#Run3Name#',
Run3Loc='#Run3Loc#',Run3Notes='#Run3Notes#',Run4Name='#Run4Name#',Run4Loc='#Run4Loc#',
Run4Notes='#Run4Notes#',Run5Name='#Run5Name#',Run5Loc='#Run5Loc#',Run5Notes='#Run5Notes#',
Run6Name='#Run6Name#',Run6Loc='#Run6Loc#',Run6Notes='#Run6Notes#,Run7Name='#Run7Name#',
Run7Loc='#Run7Loc#',Run7Notes='#Run7Notes#',Run8Name='#Run8Name#',Run8Loc='#Run8Loc#',
Run8Notes='#Run8Notes#',Run9Name='#Run9Name#',Run9Loc='#Run9Loc#',Run9Notes='#Run9Notes#',
Run10Name='#Run10Name#',Run10Loc='#Run10Loc#',Run10Notes='#Run10Notes#',Run11Name='#Run11Name#',
Run11Loc='#Run11Loc#',Run11Notes='#Run11Notes#',Run12Name='#Run12Name#',Run12Loc='#Run12Loc#',
Run12Notes='#Run12Notes#',Run13Name='#Run13Name#',Run13Loc='#Run13Loc#',Run13Notes='#Run13Notes#',
Run14Name='#Run14Name#',Run14Loc='#Run14Loc#',Run14Notes='#Run14Notes#',Run15Name='#Run15Name#',
Run15Loc='#Run15Loc#',Run15Notes='#Run15Notes#',Run16Name='#Run16Name#',Run16Loc='#Run16Loc#',
Run16Notes='#Run16Notes#',Run17Name='#Run17Names#',Run17Loc='#Run17Loc#',Run17Notes='#Run17Notes#',
Run18Name='#Run18Name#',Run18Loc='#Run18Loc#',Run18Notes='#Run18Notes#',Run19Name='#Run19Name#',
Run19Loc='#Run19Loc#',Run19Notes='#Run19Notes#',Run20Name='#Run20Name#',Run20Loc='#Run20Loc#',
Run20Notes='#Run20Notes#'
WHERE PriKey=#PriKey#
</cfquery>
<html>
<head>
<title>EDITED !!</title>
</head>
<body>
YOUR ENTRY HAS BEEN UPDATED.
</body>
</html>
 
at the end of the LastYear piece you have got a missing ' so the line shuld read LastYear='#LastYear#', and at the end of run6Notes. if you fix those two then the query should run OK.
 
HEY .. THANKS FOR YOUR HELP.
FIXED THE COUPLE OF ERRORS YOUR POINTED OUT AND IT WORKED LIKE MAGIC.

THANKS A LOT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top