Re: Unrecognized escape sequence \* - MSDN - Microsoft [PDF]

Hi, one question How do you say at compiler / is / and not sequence scape? thanks. Tuesday, March 10, 2009 11:43 PM. Rep

8 downloads 31 Views 78KB Size

Recommend Stories


Escape Escape Escape
We can't help everyone, but everyone can help someone. Ronald Reagan

MSDN-AA Available Software List
Forget safety. Live where you fear to live. Destroy your reputation. Be notorious. Rumi

HISTORY TAKING SEQUENCE(pdf)
Open your mouth only if what you are going to say is more beautiful than the silience. BUDDHA

Francais -Sequence-06.pdf
Everything in the universe is within you. Ask all from yourself. Rumi

Begleitbrosch re PDF
Pretending to not be afraid is as good as actually not being afraid. David Letterman

[PDF] You re Hired!
Nothing in nature is unbeautiful. Alfred, Lord Tennyson

[PDF] Troubleshooting Microsoft Technologies
Never let your sense of morals prevent you from doing what is right. Isaac Asimov

PDF, Brosch re (020206)
Keep your face always toward the sunshine - and shadows will fall behind you. Walt Whitman

PDF Microsoft Office 2007
Learning never exhausts the mind. Leonardo da Vinci

microsoft project - WordPress.com [PDF]
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

DEV CENTERS

RELATED SITES

CONNECT

DEVELOPER RESOURCES

Windows

Visual Studio

Forums

Code samples

Office

Visual Studio Integrate

Blog

Documentation

More...

VSIP Program

Facebook

Downloads

Microsoft .NET

LinkedIn

Products & extensions for Visual Studio

Microsoft Azure

Stack Overflow

REST APIs

Twitter

Testing tools for web developers

Visual Studio Events

Videos and tutorials

YouTube

Virtual Labs

United States (English)

© 2018 Microsoft

Terms of Use

Trademarks

Privacy Statement

Site Feedback

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.