General information
Title:
VFP connection string in VS 2010
I am trying to set up, and then retrieve a connection string, but i keep getting a blank returned
My App.Config file is:
?xml version="1.0" encoding="utf-8" ?
configuration>
configSections>
sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
section name="Top20.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"
sectionGroup>
configSections
applicationSettings
Top20.Properties.Settings
setting name="MySalesDatabase" serializeAs="String"
value>Provider=VFPOLEDB.1;Data Source=F:\MYFOLDER\LIVE\DFS.DBC
value>
setting
Top20.Properties.Settings
applicationSettings
configuration
(Ive stripped out all html tags... not sure how to send text with html tags imbedded)
My c# code is:
string x = System.Configuration.ConfigurationManager.AppSettings["MySalesDatabase"];
Tia
Gerard
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only