By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,621 Members | 1,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,621 IT Pros & Developers. It's quick & easy.

appSettings, the & char and 'error occured while parsing EntityNam

P: n/a
I have a file name in my app.config file which contains the & character.

<appSettings>
<!-- User application and configured property settings go here.-->
<!-- Connection string values -->
<add key="ExcelFileName" value="T:\HR & Development\Personnel\Weekly
Report\Weekly Report.XLS" />

When I try to read this in my app, I get an 'error occured while parsing
EntityName'. Now I've found out that this is a known problem, but how do I
get around it without changing the value= field.

TIA

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Found the solution, at last! You need to replace the & character with &amp;
D'oh!

"John Mason" wrote:
I have a file name in my app.config file which contains the & character.

<appSettings>
<!-- User application and configured property settings go here.-->
<!-- Connection string values -->
<add key="ExcelFileName" value="T:\HR & Development\Personnel\Weekly
Report\Weekly Report.XLS" />

When I try to read this in my app, I get an 'error occured while parsing
EntityName'. Now I've found out that this is a known problem, but how do I
get around it without changing the value= field.

TIA

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.