Click here to Skip to main content
15,900,705 members
Home / Discussions / C#
   

C#

 
GeneralRe: Converting double slashes Pin
Mike Dimmick27-Jul-07 3:02
Mike Dimmick27-Jul-07 3:02 
GeneralRe: Converting double slashes Pin
Mark0627-Jul-07 3:06
Mark0627-Jul-07 3:06 
GeneralRe: Converting double slashes Pin
Guffa27-Jul-07 3:12
Guffa27-Jul-07 3:12 
GeneralRe: Converting double slashes Pin
Mike Dimmick27-Jul-07 3:14
Mike Dimmick27-Jul-07 3:14 
GeneralRe: Converting double slashes Pin
Mark0627-Jul-07 3:31
Mark0627-Jul-07 3:31 
GeneralRe: Converting double slashes Pin
Mike Dimmick27-Jul-07 3:13
Mike Dimmick27-Jul-07 3:13 
JokeRe: Converting double slashes Pin
Luc Pattyn27-Jul-07 10:42
sitebuilderLuc Pattyn27-Jul-07 10:42 
AnswerRe: Converting double slashes Pin
Guffa27-Jul-07 3:10
Guffa27-Jul-07 3:10 
Mark06 wrote:
I've tried command.CommandText.Replace("\\",@"\");
but it didnt do anything to the commandtext value.


Of course not. You are replacing each single backslash with a single backslash.

Also, the Replace method doesn't change the string, it returns the new string, so you have to use the result of the method:

str = str.Replace("\\\\", "\\");

Still, the string literal that you showed doesn't contain any double backslashes, so that will not have any effect at all.

What has made you come to the conclusion that the database has any problems with double backslashes, and why do you think that your string contains any?

---
single minded; short sighted; long gone;

QuestionHard drive serial number Pin
Yosh_27-Jul-07 2:37
professionalYosh_27-Jul-07 2:37 
AnswerRe: Hard drive serial number Pin
Bekjong27-Jul-07 2:46
Bekjong27-Jul-07 2:46 
AnswerRe: Hard drive serial number Pin
Mike Dimmick27-Jul-07 3:09
Mike Dimmick27-Jul-07 3:09 
AnswerRe: Hard drive serial number Pin
zeno_nz28-Jul-07 0:06
zeno_nz28-Jul-07 0:06 
GeneralRe: Hard drive serial number Pin
Yosh_30-Jul-07 1:58
professionalYosh_30-Jul-07 1:58 
AnswerRe: Hard drive serial number Pin
Harkamal Singh28-Jul-07 22:27
Harkamal Singh28-Jul-07 22:27 
Questioninternal/internal protected Pin
Sonia Gupta27-Jul-07 2:12
Sonia Gupta27-Jul-07 2:12 
AnswerRe: internal/internal protected Pin
Pete O'Hanlon27-Jul-07 2:17
mvePete O'Hanlon27-Jul-07 2:17 
GeneralRe: internal/internal protected Pin
Sonia Gupta27-Jul-07 2:22
Sonia Gupta27-Jul-07 2:22 
GeneralRe: internal/internal protected Pin
Malcolm Smart27-Jul-07 2:24
Malcolm Smart27-Jul-07 2:24 
GeneralRe: internal/internal protected Pin
Pete O'Hanlon29-Jul-07 10:04
mvePete O'Hanlon29-Jul-07 10:04 
GeneralRe: internal/internal protected Pin
Pete O'Hanlon29-Jul-07 10:13
mvePete O'Hanlon29-Jul-07 10:13 
QuestionTreeView Bug! [modified] Pin
mjelten27-Jul-07 1:48
mjelten27-Jul-07 1:48 
AnswerRe: TreeView Bug! Pin
Paul Conrad28-Jul-07 17:49
professionalPaul Conrad28-Jul-07 17:49 
QuestionInstantiate Array of User defined type Pin
kildareflare27-Jul-07 1:36
kildareflare27-Jul-07 1:36 
AnswerRe: Instantiate Array of User defined type Pin
Pete O'Hanlon27-Jul-07 1:56
mvePete O'Hanlon27-Jul-07 1:56 
GeneralRe: Instantiate Array of User defined type Pin
kildareflare27-Jul-07 23:46
kildareflare27-Jul-07 23:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.