Wish it was that easy.....that was my first guess, though. (See the code I
posted in another message).
Thanks anyway!
D
*************
Diana Nichols
Webmistress
http://www.lavenderthreads.com
770.434.7374

"One man's magic is another man's engineering." ---Lazarus Long

-----Original Message-----
From: Christopher Cortes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 11:02 AM
To: CF-Talk
Subject: RE: ' in SQL 2000


Diana,

Could you by chance have stray single quotes in the data you are trying to
insert?

- Chris

<!----------------------------------------------------------->
Christopher Cortes                   |Coming Q3 2001:
Consultant                           |
Stonebridge Technologies, Inc.       | ’Optimizing ColdFusion’
     Putting Technology To Work      |           By
Visit us at www.sbti.com             |   Christopher Cortes
Ofc: 713.985.6244 cel: 281.235.6100  |     www.osborne.com
<-----------------------------------------------------------!>


-----Original Message-----
From: Diana Nichols [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 8:42 AM
To: CF-Talk
Subject: ' in SQL 2000


I'm having a frustrating problem....
I have several queries in which I'm composing the SQL statement and then
inserting it into the query through a variable (Necessary because I'm
looping through a list to get the fieldnames and values).

e.g.: <cfset list1="#field1#, #field2#"><cfset list2=" '#value1#',
'#value2#' ">

then in the query:
insert into table1(#list1#)
values (#list2#)

When I output the generated SQL, it looks perfect....but SQL seems to be
having a problem with the  ' (single quotes) surrounding strings ....I've
tried preservesinglequotes(), using chr(39), etc.......and I still get
syntax errors on insert or update.  When I take the output data and manually
insert it into the query, it works fine - eliminating the possibility of
data type errors.
I've tried this with 4 different queries, with the same results.

I've now run out of things to try......Ideas?

TIA!
D

*************
Diana Nichols
Webmistress
http://www.lavenderthreads.com
770.434.7374

"One man's magic is another man's engineering." ---Lazarus Long
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to