Thread: can't update 'c:\windows'

can't update 'c:\windows'

From
"guard"
Date:
dear all

IF update table set field='c:\windows'
but

c:\windows -> c:windows

--





Re: can't update 'c:\windows'

From
"Josh Berkus"
Date:
Guard,

First, this kind of beginner question is more appropriate for the NOVICE
list.

> IF update table set field='c:\windows'
> but
> 
> c:\windows -> c:windows

That's because "\" is the Unix escape character.  If I were to want to
save "O'Reilly", for example, I could:
UPDATE table SET name = 'O\'Reilly';

Since you want to save an actual backslash, do this:

UPDATE table SET field = 'C:\\windows';

In your interface code, you may which to add a function that doubles
your backslashes.

-Josh Berkus


______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


Re: can't update 'c:\windows'

From
Roberto Mello
Date:
On Mon, Oct 22, 2001 at 05:14:32PM +0800, guard wrote:
> dear all
> 
> IF update table set field='c:\windows'
> but
> 
> c:\windows -> c:windows

Errr. Some context please? My crystal ball is still getting fixed :)

-Roberto
-- 
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+ Roberto Mello - Computer Science, USU -
http://www.brasileiro.net      http://www.sdl.usu.edu - Space Dynamics Lab, Developer    
 
Windows is not the problem. Ignorance is the problem.


Re: can't update 'c:\windows'

From
"guard"
Date:
thanks. your reply



--

""Josh Berkus"" <josh@agliodbs.com> ���g���l���s�D
:web-490710@davinci.ethosmedia.com...
> Guard,
>
> First, this kind of beginner question is more appropriate for the NOVICE
> list.
>
> > IF update table set field='c:\windows'
> > but
> >
> > c:\windows -> c:windows
>
> That's because "\" is the Unix escape character.  If I were to want to
> save "O'Reilly", for example, I could:
> UPDATE table SET name = 'O\'Reilly';
>
> Since you want to save an actual backslash, do this:
>
> UPDATE table SET field = 'C:\\windows';
>
> In your interface code, you may which to add a function that doubles
> your backslashes.
>
> -Josh Berkus
>
>
> ______AGLIO DATABASE SOLUTIONS___________________________
>                                        Josh Berkus
>   Complete information technology      josh@agliodbs.com
>    and data management solutions       (415) 565-7293
>   for law firms, small businesses        fax 621-2533
>     and non-profit organizations.      San Francisco
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster