•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 397,786 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,381 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:
Views: 4633 | Replies: 1 | Solved
![]() |
•
•
Join Date: Apr 2006
Posts: 29
Reputation:
Rep Power: 3
Solved Threads: 0
I keep getting this error when ever I try to update or delete a record from my site. The error that I keep getting is "The string is not closed" I have use an example straight from the book so I don't know where to go. Here is my code
It highlights this line "Reason='#form.Reason#'" from my update query as the problem. Any help would be great.
Thanks
<cfsetting showdebugoutput="yes">
<!--check to see if we are deleting recrod-->
<cfif (IsDefined('form.delete') and Trim(form.delete) EQ "Delete")>
<!--query to delete record by ID-->
<cfquery name="DeleteBusRecord" datasource="Rumors_Forms">
DELETE FROM BusTable
WHERE ID = #ID#
</cfquery>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Rumors Bar & Grill | Review Entry</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css" type="text/css">
<body>
<div id="page">
<div id="header"><img src="Images/top3.jpg"></div>
<div id="nav" bordercolor="ffffff"> <cfinclude template="navigation.cfm"> </div>
<div id="content" valign="top">
<br>
<h1>The Record has been deleted!</h1>
</div>
<div id="right" valign="top">and here is extra, maybe an ad or something</div>
<!--<div id="footer">copyright and what not</div>-->
</div>
</body>
</html>
<cfelse>
<!-- If bus is not booked insert into DB using the following query -->
<cfquery name="UpdateBus" datasource="Rumors_Forms">
UPDATE BusTable
SET Name='#form.Name#',
Req_Date='#form.Month#/#form.Day#/form.Year#',
Req_Time='#form.Req_Time#',
Address='#form.Address#',
Email='#form.Email#',
PhoneNumber='#form.PhoneNumber#',
Reason='#form.Reason#'
WHERE ID =#form.ID#
</cfquery>
<!-- query to select updated record -->
<cfquery name="GetBusRecord" datasource="Rumors_Forms">
SELECT ID, Name, Req_Date, Req_Time, Address, Email, PhoneNumber, Reason
FROM BusTable
WHERE ID =#form.ID#
</cfquery>
<!-- Mail resuts to myself and form.email -->
<cfmail query="GetBusRecord"
from="donotreply@rumorssportsbar.com"
to="#form.Email#"
bcc="ericstauss@gmail.com"
subject="Bus reservation update
type="html">
<table border="1" cellpadding="0">
<tr><h3>Here are the details...</h3></tr>
<tr>
<th>Confirmation Number</th>
<th>Name</th>
<th>Date</th>
<th>Time</th>
<th>Address</th>
<th>E-mail</th>
<th>Phone Number</th>
<th>Purpose of Rental</th>
</tr>
<tr>
<td>#ID#</td>
<td>#Name#</td>
<td>#Req_Date#</td>
<td>#Req_Time#</td>
<td>#Address#</td>
<td>#Email#</td>
<td>#PhoneNumber#</td>
<td>#Reason#</td>
</tr>
</cfmail>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Rumors Bar & Grill | Review Entry</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css" type="text/css">
<body>
<div id="page">
<div id="header"><img src="Images/top3.jpg"></div>
<div id="nav" bordercolor="ffffff"> <cfinclude template="navigation.cfm"> </div>
<div id="content" valign="top">
<br>
<table border="1" cellpadding="0">
<h3>Here are the details...</h3>
<tr>
<th>Confirmation Number</th>
<th>Name</th>
<th>Date</th>
<th>Time</th>
<th>Address</th>
<th>E-mail</th>
<th>Phone Number</th>
<th>Purpose of Rental</th>
</tr>
<cfoutput query="GetBusRecord">
<tr>
<td>#ID#</td>
<td>#Name#</td>
<td>#Req_Date#</td>
<td>#Req_Time#</td>
<td>#Address#</td>
<td>#Email#</td>
<td>#PhoneNumber#</td>
<td>#Reason#</td>
</tr>
</cfoutput>
</table>
</div>
<div id="right" valign="top">and here is extra, maybe an ad or something</div>
<!--<div id="footer">copyright and what not</div>-->
</div>
</body>
</html>
</cfif>It highlights this line "Reason='#form.Reason#'" from my update query as the problem. Any help would be great.
Thanks
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ColdFusion Marketplace
- automatic update error?? (Windows NT / 2000 / XP / 2003)
- againt error (ASP)
- SQL statement error (ASP.NET)
- I cannot delete a folder (error message) (Windows NT / 2000 / XP / 2003)
- windows update error (Windows NT / 2000 / XP / 2003)
- $rs=mysql_query($sql) or die("error in common.inc.php at line 257"); (PHP)
Other Threads in the ColdFusion Forum
- Previous Thread: loading a swf file using a variable
- Next Thread: different page titles


Linear Mode