will demonstrate this capability using our âOrder Processing Systemâ project from Example 9.1. ...... Use your imagination and assume that a CPM/PERT network, as shown in the figure at the top of the following page, with the following estimated a
Idea Transcript
This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use.
Learn more SIGN IN
GALLERY
MSDN LIBRARY
Ask a question
FORUMS
get started for free Search related threads
Search forum questions
Quick access Answered by:
Re: Unrecognized escape sequence \* Visual Studio Languages , .NET Framework > Visual C# Question Hi, I have a diferent problem, see: SqlConnection myConnection = new SqlConnection("Data Source=HOGAR\SQLEXPRESS;Initial Catalog=tienda;Integrated Security=True");
0
Unrecognized escape sequence in my connection string. Thanks for the answers
Sign in to vote Sunday, June 03, 2007 5:32 AM Reply | Quote
Answers
2 Sign in to vote
The problem lies in the fact that the C# parser thinks you are escaping the \s in the init string, when you just want to show the hierarchy. To make the whole string a literal (ignoring the escapes) do this new SQlConnection(@"Data Source=HOGAR\SQLEXPRES;Init..."); otherwise you need to let the compiler know that the slash is a slash and not an escape. The other way to do the same thing is: new SQlConnection("Data Source=HOGAR\\SQLEXPRES;Init..."); The above is creating a true escape for the compiler saying \\ is an escape for \ which it will be translated to when sent to the sql connection. Sunday, June 03, 2007 4:09 PM
Moderator
Reply | Quote
All replies
2 Sign in to vote
The problem lies in the fact that the C# parser thinks you are escaping the \s in the init string, when you just want to show the hierarchy. To make the whole string a literal (ignoring the escapes) do this new SQlConnection(@"Data Source=HOGAR\SQLEXPRES;Init..."); otherwise you need to let the compiler know that the slash is a slash and not an escape. The other way to do the same thing is: new SQlConnection("Data Source=HOGAR\\SQLEXPRES;Init..."); The above is creating a true escape for the compiler saying \\ is an escape for \ which it will be translated to when sent to the sql connection. Sunday, June 03, 2007 4:09 PM
Moderator
Reply | Quote
0 Sign in to vote
Hi, one question How do you say at compiler / is / and not sequence scape? thanks Tuesday, March 10, 2009 11:43 PM Reply | Quote
0 Sign in to vote
Thank you for this info; I usually write in VB.NET, but want to know how to write in both, so I don't always have to convert code to understand it. So this info about was huge. Thanks. Chris Wednesday, December 09, 2009 8:33 PM Reply | Quote