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

Parse error on query

Status
Not open for further replies.

Dryvlyne

IS-IT--Management
Oct 15, 2004
25
US
I'm still learning the ropes of ColdFusion, so please forgive my ignorance. Today I was just creating a simple query against a DB for some customer records and recieved a parsing error. Basically I know what the problem is, but I don't know how to fix it .

As I indicated, I'm just querying customer data for display in a browser. Unfortunately I've discovered that the last name of one of my customers contains an apostrophe which is causing the parse error. How do I overcome this?

Here's what the markup of that particular line the web page look like:
Code:
<CFCOL HEADER="<B>LAST NAME</B>" WIDTH="15" TEXT="#CUS_LNAME#">

Thanks in advance
 
FALCONSEYE,

Thanks for the post. Unfortunately I was unable to get your method to work. Although I did not get any errors the customer last name output was replaced with just cus_lname.

At any rate, I found a co-worker that was able to assist me. Here is a look at his solution in case you are interested. I have verified and it does indeed work.

Code:
<CFCOL HEADER="<B>LAST NAME</B>" WIDTH="15" TEXT="#Replace(CUS_LNAME,"'","''","ALL")#">

Again though, thanks for posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top