...

View Full Version : Resolved escape?



alykins
06-15-2011, 03:01 AM
This is probably the wrong forum for this; but asp.net is not specifically C# and it relates to connecting to my server and there is usually not too much traffic on the asp.net page...
my question. In setting up my connection string for my DB there is an instance of "COMPUTERNAME\Dstuff" which C# recognizes as an escape (\D) sequence.
Does anyone know the proper way to display the \D as literally \D and not an escape? I tried using ' around it- I also thought there was a trick with @... I'm stuck

abduraooft
06-15-2011, 10:13 AM
Check the table at http://dev.mysql.com/doc/refman/5.0/en/string-syntax.html

alykins
06-15-2011, 10:08 PM
Check the table at http://dev.mysql.com/doc/refman/5.0/en/string-syntax.html

Thanx for that- not quite what I was looking for, but nice to know that I also have to ahndle escape sequences in my tSQL lang... The more specific code I was looking for I finally found buried in a C# book-
For C#
for any interested if you have a \b (or some other escape/expression) yo can make the compiler see it as literal bu placeing @ before it; so eg if I have string blah= "\n bingo";
and I do not want the compiler to recognize \n as "new line"
you would phrase it
string blah: @"\n bingo";
... again- not sure this should be in here; but nice to know the info about SQL having escapes/expression paths as well)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum