CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14

Thread: error

  1. #1
    Join Date
    Apr 2008
    Posts
    15

    Exclamation error

    actual code is

    String ConnectionString = System.Configuration.ConfigurationManager.AppSettings["AddressDB"];

    but i didnot found ConfiguartionManager after entering "System.Configuration."..

    plz help.

    thnks

  2. #2
    Join Date
    May 2007
    Location
    Denmark
    Posts
    623

    Re: error

    And the error message is...?

    post it, please
    It's not a bug, it's a feature!

  3. #3
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: error

    Have you had included reference to System.Configuration.dll?
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

  4. #4
    Join Date
    Apr 2007
    Location
    Florida
    Posts
    403

    Re: error

    He's entering a fully qualified name, doesn't have to include anything.

    If you don't find ConfigurationManager class as part of System.Configuration namespace, then the ConfigurationManager class doesn't exist in the System.Configuration namespace.

    .NET won't lie to you... (although intellisense may lie so don't trust it... try yourself by compiling your code and see if it compiles... intellisense doesnt always tell the truth).

  5. #5
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Thumbs down Re: error

    Quote Originally Posted by mariocatch
    He's entering a fully qualified name, doesn't have to include anything.
    Definitely not! A single namespace can spread over several assemblies.

    What I'm talking about is assembly reference, not the using keyword.

    So again, abhijan13, check, if you have added the reference to assembly System.Configuration.dll to you project. What version of VS do you use? What's the exact error message you receive?
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

  6. #6
    Join Date
    Apr 2008
    Posts
    15

    Re: error

    actual error message is-
    'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings' C:\Documents and Settings\Abilash\My Documents\Visual Studio 2005\Projects\WindowsApplication11\WindowsApplication11\AddressManager.cs 24 39 WindowsApplication11

  7. #7
    Join Date
    Apr 2008
    Posts
    15

    Re: error

    wil u plz tell me how we add this reference--

    System.Configuration.dll?

  8. #8
    Join Date
    Apr 2008
    Posts
    15

    Re: error

    actual error message is-
    'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings' C:\Documents and Settings\Abilash\My Documents\Visual Studio 2005\Projects\WindowsApplication11\WindowsApplication11\AddressManager.cs 24 39 WindowsApplication11

  9. #9
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: error

    Quote Originally Posted by abhijan13
    wil u plz tell me how we add this reference--

    System.Configuration.dll?

    Open Project menu and select Add reference. In the resulting dialog look for System.Configuration. Select it and click ok.

  10. #10
    Join Date
    Apr 2008
    Posts
    15

    Re: error

    thanks..i gt the System.Configuration..

  11. #11
    Join Date
    May 2007
    Posts
    1,546

    Re: error

    Quote Originally Posted by abhijan13
    actual error message is-
    'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings' C:\Documents and Settings\Abilash\My Documents\Visual Studio 2005\Projects\WindowsApplication11\WindowsApplication11\AddressManager.cs 24 39 WindowsApplication11
    That's a warning message, not an error message. It's also pretty self-explanatory. The method you're using is depreciated. There's a newer method available for getting the same information, and you should use that instead.
    www.monotorrent.com For all your .NET bittorrent needs

    NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.

  12. #12
    Join Date
    Apr 2008
    Posts
    15

    Re: error

    error again..

    private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
    {
    dataGridView1.Select(dataGridView1.CurrentRow.Index);
    LoadCurrentItem();
    SetEditState(false);
    }

    Error is--" No OverLoad for Method 'Select' takes '1' argument

  13. #13
    Join Date
    Apr 2008
    Posts
    15

    Re: error

    error again..

    private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
    {
    dataGridView1.Select(dataGridView1.CurrentRow.Index);
    LoadCurrentItem();
    SetEditState(false);
    }

    Error is--" No OverLoad for Method 'Select' takes '1' argument

  14. #14
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: error

    Did you try to check what MSDN says about the Select method. I wonder, why people do not check the documentation before relying on others to resolve the problem.

    Your first reference should be MSDN. After all MS is the one who created .NET Framework so their documentation should be the one that you should refer. And if you still don't understand something you can always post it here.

    You should also use CODE tags. Refer our FAQ or look at my signature.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured