Results 1 to 3 of 3

Thread: I need help on Registry class in .NETto display all the ODBC User DSN

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Location
    Bangalore
    Posts
    172

    I need help on Registry class in .NETto display all the ODBC User DSN

    Hi
    I need help on Registry class in .NET.

    I need to display all the ODBC User DSN, in my login screen, so that they can select the DSN and connect to the database. I heard it can be done using Registry class. Kindly help me to do so.


    Thank you

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: I need help on Registry class in .NETto display all the ODBC User DSN

    You use the Microsoft.Win32.Registry and RegistryKey classes to access the registry in .NET code. As for if and where ODBC DSN data may be found in the registry, that's not really a C# issue. Once you know how to use those classes you can access any value in any key. Which keys and values you access are up to you.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Location
    Bangalore
    Posts
    172

    Re: I need help on Registry class in .NETto display all the ODBC User DSN

    Hi
    i am using following code in VB

    Private Declare Function SQLDataSources Lib "odbc32.dll" _
    (ByVal hEnv As Long, _
    ByVal fDirection As Integer, _
    ByVal szDSN As String, _
    ByVal cbDSNMax As Integer, _
    pcbDSN As Integer, _
    ByVal szDescription As String, _
    ByVal cbDescriptionMax As Integer, _
    pcbDescription As Integer) As Long


    Now i am converting my project to asp.net

    so i need help

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