main logo
Subject: Re: Apostrophes
Author: Ruslan Zasukhin
Posted: 2003/12/04 02:32:00
 
View Entire Thread
New Search


on 12/4/03 7:21 AM, Deane Venske at deane.venske .AT. eduss D.O.T com wrote:

>> My trick in Access for storing text fields that contain apostrophes was
>> to
>> construct SQL variables that enclose text variables in CHR(34), i.e.
>> quotation marks. However, since that doesn't appear to work with
>> Valentina,
>> what trick do you recommend? I'm about to change all of my SQL statements
>> and Getstrings to substitute apostrophes for exclamation marks and back
>> again on the fly --- the items I'm storing can never contain exclamation
>> marks naturally.
>>
>> But there's probably a better way that you all will recommend to me.
>> chuck
> The best way I know of is to escape apostrophes, I've used the backslash :
> INSERT INTO table1 VALUE('O\'Neil') BUT this doesn't always work (I think
> it's selects that don't like it. So you need to use : SELECT FROM table1
> WHERE username = 'O''Neil'.
>
> But give both methods a try, they can be bothersome.

And you need use EscapeString() function to make life easier.

--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan@paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------

_______________________________________________
Valentina mailing list
Valentina .AT. lists D.O.T macserve.net
http://lists.macserve.net/mailman/listinfo/valentina




 
©2003 Ruslan Zasukhin
<-- Prior Message New Search Next Message -->