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

Storing \ in varchar 1

Status
Not open for further replies.

tommyboyau

Programmer
Feb 7, 2005
47
AU
Hi Everyone,
When I generate a varchar with a \ in it, it comes out as a funny symbol and eats a character on the right side of it.
I want to store a filepath in the db. As follows:
Input: 'c:\testData\Reservation.doc'


Any suggestions?

Thanks,

Tom
 
You should double the backslashes:
[tt]
"c:\\testData\\Reservation.doc"
[/tt]
A backslash is used to indicate that the following character is to be treated specially, for example \t is converted to a tab, and \\ is converted to a single backslash.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top