Or do it dynamically like so:
#REReplace(Form.FieldName, "'", "''", "ALL")#
John McKown, VP Business Services
Delaware.Net, Inc.
30 Old Rudnick Lane, Suite 200 Dover, DE 19901
email: [EMAIL PROTECTED]
phone: 302-736-5515
fax: 302-736-5945
icq: 1495432
> -Original Message-
> From: Pho
Ooops! I didn't read your query thoroughly enough. I just glanced at it and
escaped the single quote. My apologies. This is what you'll want to do:
INSERT INTO MyTABLE (
Stuff
)
VALUES (
)
Sorry about that. I'll have to pay more attention next time. :)
Benjamin S. Rogers
We
> you can use PreserveSingleQuoutes(#var#)
Actually, the preserve single quotes function should only be used when you
are writing whole the SQL expression (rather than just data values). If you
do this, you must take special care to escape all single quotes in your
single quoted value strings.
>
If it's in a var CF will auto escape it, if not manually escape it. '' is an
escaped single quote for SQL.
INSERT INTO MyTABLE(Stuff)
VALUES ()
Would insert a single quote into the db. Same idea as using ## to get CF to
display a # inside a .
-Original Message-
From: Phoeun Pha [ma
> ok, I want to enter this character into a SQL table. '
>
> but i get an error. how do I make it enter ' into the database?
>
> INSERT INTO MyTABLE(Stuff)
> VALUES = '''
You might want to look into PreserveSingleQuotes()
Also, your SQL probably won't work;
INSERT INTO myTable (stuff)
VALUES
don't use = in the SQL statement. you should be able to do
INSERT INTO
MyTABLE
(Stuff)
VALUES
(''')
if that doesn't work, use the CF PreserveSingleQuotes() function.
-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22,
you can use PreserveSingleQuoutes(#var#)
-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 10:59 AM
To: CF-Talk
Subject: Single Quotes in SQL HELP PLEASE!
ok, I want to enter this character into a SQL table. '
but i get an error. how do I
One more '
INSERT INTO MyTABLE(Stuff)
VALUES =
-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 11:59 AM
To: CF-Talk
Subject: Single Quotes in SQL HELP PLEASE!
ok, I want to enter this character into a SQL table. '
but i get an erro
8 matches
Mail list logo