|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Darn, still does not work!Vs2003, Winform app, trying to read an application setting
Dim MyAppMgr as new System.configuration.AppsettingsReader Me.textbox1.text = MyAppMgr.Getvalue("MyServerName",string) Now when I execute the first line I get a system.dll exception because it says required attiubte 'Value' not found. What value, there are no choices possibles either as other objects or as parameters for AppsettingsReader in intellisense. If I don't include the word new in the line obviously MyappMgr object stays to nothing and the next line gives me an error. How do I get out of this friggin catch 22. Any help appreciated. Bob Bob wrote:
Show quoteHide quote > Vs2003, Winform app, trying to read an application setting It's telling you that it can't find "MyServerName"> > Dim MyAppMgr as new System.configuration.AppsettingsReader > Me.textbox1.text = MyAppMgr.Getvalue("MyServerName",string) > Now when I execute the first line I get a system.dll exception because it > says required attiubte 'Value' not found. > > What value, there are no choices possibles either as other objects or as > parameters for AppsettingsReader in intellisense. If I don't include the > word new in the line obviously MyappMgr object stays to nothing and the next > line gives me an error. > > How do I get out of this friggin catch 22. > > Any help appreciated. > > Bob > > Chris No the line that gives me an unhandled exception is the Dim Line.
Bob Show quoteHide quote "I Don't Like Spam" <no@spam.com> wrote in message news:urFUuGGJGHA.3492@TK2MSFTNGP09.phx.gbl... > Bob wrote: >> Vs2003, Winform app, trying to read an application setting >> >> Dim MyAppMgr as new System.configuration.AppsettingsReader >> Me.textbox1.text = MyAppMgr.Getvalue("MyServerName",string) >> Now when I execute the first line I get a system.dll exception because it >> says required attiubte 'Value' not found. >> >> What value, there are no choices possibles either as other objects or as >> parameters for AppsettingsReader in intellisense. If I don't include the >> word new in the line obviously MyappMgr object stays to nothing and the >> next line gives me an error. >> >> How do I get out of this friggin catch 22. >> >> Any help appreciated. >> >> Bob >> >> > > It's telling you that it can't find "MyServerName" > > Chris Dim MyAppMgr As New System.configuration.AppSettingsReader
Me.TextBox1.Text = MyAppMgr.GetValue("MyServerName", GetType(String)).ToString Show quoteHide quote "Bob" <bduf***@sgiims.com> wrote in message news:%23dNsclGJGHA.2012@TK2MSFTNGP14.phx.gbl... > No the line that gives me an unhandled exception is the Dim Line. > Bob > > > "I Don't Like Spam" <no@spam.com> wrote in message > news:urFUuGGJGHA.3492@TK2MSFTNGP09.phx.gbl... >> Bob wrote: >>> Vs2003, Winform app, trying to read an application setting >>> >>> Dim MyAppMgr as new System.configuration.AppsettingsReader >>> Me.textbox1.text = MyAppMgr.Getvalue("MyServerName",string) >>> Now when I execute the first line I get a system.dll exception because >>> it says required attiubte 'Value' not found. >>> >>> What value, there are no choices possibles either as other objects or as >>> parameters for AppsettingsReader in intellisense. If I don't include the >>> word new in the line obviously MyappMgr object stays to nothing and the >>> next line gives me an error. >>> >>> How do I get out of this friggin catch 22. >>> >>> Any help appreciated. >>> >>> Bob >>> >>> >> >> It's telling you that it can't find "MyServerName" >> >> Chris > > Hi,
This is how I do it. http://www.vb-tips.com/default.aspx?ID=86c1810a-1e9d-4b9f-97e9-414986d2fb7d Ken ----------------- Show quoteHide quote "Bob" <bduf***@sgiims.com> wrote in message news:uG43XtFJGHA.1312@TK2MSFTNGP09.phx.gbl... > Vs2003, Winform app, trying to read an application setting > > Dim MyAppMgr as new System.configuration.AppsettingsReader > Me.textbox1.text = MyAppMgr.Getvalue("MyServerName",string) > Now when I execute the first line I get a system.dll exception because it > says required attiubte 'Value' not found. > > What value, there are no choices possibles either as other objects or as > parameters for AppsettingsReader in intellisense. If I don't include the > word new in the line obviously MyappMgr object stays to nothing and the > next line gives me an error. > > How do I get out of this friggin catch 22. > > Any help appreciated. > > Bob > > Thank you all,
Bob Show quoteHide quote "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:OGntBpMJGHA.1180@TK2MSFTNGP09.phx.gbl... > Hi, > > This is how I do it. > > http://www.vb-tips.com/default.aspx?ID=86c1810a-1e9d-4b9f-97e9-414986d2fb7d > > Ken > ----------------- > "Bob" <bduf***@sgiims.com> wrote in message > news:uG43XtFJGHA.1312@TK2MSFTNGP09.phx.gbl... >> Vs2003, Winform app, trying to read an application setting >> >> Dim MyAppMgr as new System.configuration.AppsettingsReader >> Me.textbox1.text = MyAppMgr.Getvalue("MyServerName",string) >> Now when I execute the first line I get a system.dll exception because it >> says required attiubte 'Value' not found. >> >> What value, there are no choices possibles either as other objects or as >> parameters for AppsettingsReader in intellisense. If I don't include the >> word new in the line obviously MyappMgr object stays to nothing and the >> next line gives me an error. >> >> How do I get out of this friggin catch 22. >> >> Any help appreciated. >> >> Bob >> >> > >
User's Mail Editor
Problème data tramsmission from tableadapter to ACCESS database Odd or Even How to: Retrieving BuiltinDocumentProperties from Word Document How to: Omit Deafulted Elements from XML When Serializing late binding problem with option strict What happen to Find in Files in VS2005? convert rtf to html Can't get a value from my app.config file Playing sounds from resources in VB2005 |
|||||||||||||||||||||||