|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
'The string is not closed'
Can anyone tell me where I'm going wrong with an update action page?
The error is: Error Occurred While Processing Request The string is not closed. String begins on line 29, column 44.<p>The CFML compiler was processing:<ul><li>The body of a cfquery tag beginning on line 1, column 2.</ul> The error occurred in D:\Inetpub\webcastweddings\extras\couples\update_action.cfm: line 29 27 : loginsuccess='#Trim(Form.loginsuccess)#', 28 : linktopre='#Trim(Form.linktopre)#', 29 : linktopost='#Trim(Form.linktopost)#' 30 : 31 : WHERE couple_ID=#URL.couple_ID# My code is: <cfquery name="showcouples" datasource="weddings"> UPDATE couples SET BrideName='#Trim(Form.BrideName)#', BridesurName='#Trim(Form.BridesurName)#', GroomName='#Trim(FORM.GroomName)#', GroomsurName='#Trim(Form.GroomsurName)#', username='#Trim(FORM.username)#', password='#Trim(FORM.password)#', BrideAddress='#REReplace(Form.BrideAddress, "[#chr(10)##chr(13)#]+", "<br />", "ALL")##', weddate=<cfqueryparam value="#form.weddate#" null="#NOT IsDate(form.weddate)#" cfsqltype="CF_SQL_TIMESTAMP">, emailaddress='#Trim(Form.emailaddress)#', HomePhone='#Trim(Form.HomePhone)#', MobilePhone='#Trim(Form.MobilePhone)#', venue_ID='#Trim(Form.venue_ID)#', recep_ID='#Trim(Form.recep_ID)#', giftlist_ID='#Trim(Form.giftlist_ID)#', photo_ID='#Trim(Form.photo_ID)#', video_ID='#Trim(Form.video_ID)#', wedtime='#Trim(Form.wedtime)#', homephone='#Trim(Form.homephone)#', mobilephone='#Trim(Form.mobilephone)#', webaddress='#Trim(Form.webaddress)#', area='#Trim(Form.area)#', country='#Trim(Form.country)#', admin_username='#Trim(Form.admin_username)#', admin_password='#Trim(Form.admin_password)#', loginsuccess='#Trim(Form.loginsuccess)#', linktopre='#Trim(Form.linktopre)#', linktopost='#Trim(Form.linktopost)#' WHERE couple_ID=#URL.couple_ID# </CFQUERY> I've never had this error before and the code seems identical to others I've used! Thanks in advance. |
|
#2
|
|||
|
|||
|
Not sure but this might be it, you have an extra pound sign on this line:
BrideAddress='#REReplace(Form.BrideAddress, "[#chr(10)##chr(13)#]+", "<br />", "ALL")##', If that doesn't fix it, my advice is the same as always, strip everything away and then start adding one element at a time until the error reappears.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
Thanks Kiteless, that got rid of that error but now I get:
'Data type mismatch' I have narrowed it down to the five '_ID' fields which are foreign keys and have checked that the fields are number, long integer in db. and I am entering numbers into the fields. Any ideas as to where else I might change setting? Thanks! |
|
#4
|
|||
|
|||
|
Well it is now just a case of there needs to be something entered in the boxes and not left empty, I know i've done this before but can't remember/find the code. I have set default in db to 1 so any new records will not cause a problem. Is there a better way of doing this?
|
|
#5
|
|||
|
|||
|
You can use <cfparam> on the action page to create default values if one was not provided.
|
|
#6
|
|||
|
|||
|
OK, thanks a lot!
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > 'The string is not closed' |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|