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!

query sees form entry but still get error

Status
Not open for further replies.

dunskii

Programmer
Sep 14, 2001
107
AU
hello again....

I have aquery which recieves data from a form...it retrieves all the required data including the id but i still get an error..

i think its a formatting error but my brain has decided to stop working

cheers

heres the error

Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '' Contact = ' Phone = '2222222', Mobile ='', Email = 'aa@aa.com', Address = 'sssss', Monday = 'closed', Tuesday = 'closed', Wednesday = 'closed', Thursday = 'closed', Friday = 'closed', Saturday = 'closed', S'.

The error occurred in E:\CFusionMX\ line 153

151 : Sunday = '#variables.sunday#'
152 : WHERE
153 : Business_ID = #FORM.business_ID#
154 : </cfquery>
155 :


and heres the code

<cfquery datasource="Y_Business" name="qInsertDetails">
UPDATE
Business
SET
Name = '#FORM.name#',
ABN = '#FORM.abn#',
Description = '#FORM.description#,
Contact = '#FORM.contact#',
Phone = '#FORM.phone#',
Mobile ='#FORM.mobile#',
Email = '#FORM.email#',
Address = '#FORM.address#',
Monday = '#variables.monday#',
Tuesday = '#variables.tuesday#',
Wednesday = '#variables.wednesday#',
Thursday = '#variables.thursday#',
Friday = '#variables.friday#',
Saturday = '#variables.saturday#',
Sunday = '#variables.sunday#'
WHERE
Business_ID = #FORM.business_ID#
</cfquery>
 
Oh geez, you're gonna kick yourself for this one.

You missed one single-quote. We've all done it.

Code:
<cfquery datasource="Y_Business" name="qInsertDetails">
     UPDATE
          Business
     SET
          Name = '#FORM.name#',
          ABN = '#FORM.abn#',
          [b]Description = '#FORM.description#[red]'[/red],[/b]
          Contact = '#FORM.contact#',
          Phone = '#FORM.phone#',
          Mobile ='#FORM.mobile#',
          Email = '#FORM.email#',
          Address = '#FORM.address#',
          Monday = '#variables.monday#',
          Tuesday = '#variables.tuesday#',
          Wednesday = '#variables.wednesday#',
          Thursday = '#variables.thursday#',
          Friday = '#variables.friday#',
          Saturday = '#variables.saturday#',
          Sunday = '#variables.sunday#'
     WHERE
          Business_ID = #FORM.business_ID#
</cfquery>

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
thanks webmigit,

i knew it was going to be something simple, jst could't see it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top