How can I get a list of DSNs currently registered?

Hi everybody,
Can anyone tell me how to obtain a list of the DSNs currently registered on my machine using Java?
I want to populate a drop-down list for the user (an administrator) to select the requisite DSN to work with.
I realise that this is probably platform-specific (Windows in my case), hence posting here under JNI.
I have searched the forums here at great length for the solution, but only seem to find unhelpful replies along the lines of 'JDBC can't do that - you'll need to resort to JNI'. So could I politely ask that if you don't actually know how to do it (or can at least provide a pointer or two) then please do not reply telling me ways in which it can't be done.
Many thanks for your help.
Paul.

Hi,
Thanks for the pointers.
I already know the Windows API (I'm converting a VB app into Java and need to pick up the DSNs created for the original VB app to use via JDBC).
Regarding picking it up from the registry - I don't know how to do this via Java. I've been looking at Preferences, but it seems to me that you don't have complete access to the Registry via Preferences - am I right about that?
Re the third-party library: I have seen it mentioned a few places, seached on Google, etc, and even followed a few hopefull-looking links but I always come up with nothing :(
Ho-hum...any other suggestions please?
Cheers,
Paul.

Similar Messages

  • How can i get a print of all my registered apple products?

    How can I get a list of all my registered Apple products so I can print and keep on hand?

    http://support.apple.com/kb/HT2526 - If you registered a device you can use My Support Profile to find a list of serial numbers that have been purchased or registered with your Apple ID.
    My Support Profile - https://supportprofile.apple.com/MySupportProfile.do

  • How can I get a list of apps which are supported on ipod touch model ma623zo?

    How can I get a list of apps which are supported on ipod touch model ma623zo?
    It's about 6 years old I think.
    I have put the latest IOS on there (currently 3.1.3 (7E18)).
    I download apps from the app store but they often fail to launch. I assume they're incompatible.
    Is there a way to check which apps will work and which won't before I buy them?
    Thanks!

    I have no idea how my reply could be "misleading". I stated the exact situation: there are millions of apps in the iTunes Store, and providing a comprehensive, accurate list of which apps support which version(s) of iOS would be highly impractical. You can perhaps help with your search by going to AppShopper:
    http://appshopper.com/search/?search=iOS+3
    That will give you at least some starting points, but AppShopper is neither comprehensive nor completely accurate. I've found a number of apps listed there over the time the site has existed that either are no longer offered or which have been updated beyond the iOS version indicated. But it might help.
    Regards.

  • How can I get a list of database names from environment

    Hi,
    How can I get a list of database names from environment.
    I had found a method in JE API Docs named Environment.getDatabaseNames(), and i couldn't found the same method in Berkeley DB.
    I use java interface, is it supported?
    Thanks.

    Hello,
    I don't know if it would work for you, but have you checked the db_archive utility at:
    http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/db_archive.html
    Check the -s option.
    Thanks,
    Sandra

  • HT1420 how can I get a list of the computers that are currently authorized?

    I need to authorize my home computer after switching from PC to Mac. How can I get a list of which devices are currently authorized?

    There is no list.

  • Hi ,How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    Hi ,how can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm
    or poerwshell . i have struggled for a week
    tchocr

    Hi,
    There is no such PowerShell command can achiev this. Maybe you can use a script to get the user name with folder redirection enabled. However, I am not familiar with writing script, and it would be better for you to ask in script forum below for professional
    assistance:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=ITCG&filter=alltypes&sort=lastpostdesc
    Best Regards,
    Mandy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How can I get a list of purchased apps?

    Recently restored my iPhone from backup, and I need to download my apps.  How can I get a list of apps that I've downloaded/purchased?
    If I search for an app via the app store that I had previously installed, the Install icon turns into a Cloud with a down arrow symbol on it - there must be a way to get a list of all of these right?
    Anyone clever enough to solve this riddle?

    Open the App Store app, go to the Updates pane and tap Purchased.

  • How can I get a list of all workbooks

    Can anybody please tell me how can I get a list of all my workbooks that are on my Oracle Discoverer database without having to manually write them down? I am using Oracle Database 10g Enterprise Edition.

    Hi,
    To implement the EUL Management BA follow metalink NOTE:556932.1
    there are very simple steps you need to perform in order to use it

  • How can I get a list of all my annotations to send to someone else, listed by PAGE #, not order.

    How can I get a list of all my annotations to send to someone else, listed by PAGE #, not order??

    The comments list is sorted by page by default. If it's not for some reason, click the "Sort comments" button and select that option. It looks like this:

  • How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    Hi,
    There is no such PowerShell command can achiev this. Maybe you can use a script to get the user name with folder redirection enabled. However, I am not familiar with writing script, and it would be better for you to ask in script forum below for professional
    assistance:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=ITCG&filter=alltypes&sort=lastpostdesc
    Best Regards,
    Mandy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How can I get file list for a given directory?

    Hi,
    How can I get file list for a given directory? Is there a function?
    Thanks.

    Hi friend,
    Try this sample report. It displays all files in a directory.
    While executing give some directory name in input. ex:  C:\
    Mention file type in filter parameter. ex: *.DOC
    REPORT ztests.
    DATA : file_table LIKE TABLE OF sdokpath WITH HEADER LINE .
    DATA : dir_table LIKE TABLE OF sdokpath WITH HEADER LINE .
    PARAMETERS:p_dir(50) TYPE c.
    CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
      EXPORTING
        directory  = p_dir
        filter     = '*.DOC'
      TABLES
        file_table = file_table
        dir_table  = dir_table
      EXCEPTIONS
        cntl_error = 1
        OTHERS     = 2.
    LOOP AT file_table .
      WRITE:/ file_table-pathname.
    ENDLOOP.
    Might be helpful...
    Thanks.....
    Edited by: Guest77 on Feb 11, 2009 5:30 AM

  • How can I get a list of active savepoints for the current session?

    Hi,
    In Oracle Applications, we are getting the following error while performing ROLLBACK to a Savepoint.
    "Unexpected Error: ORA-01086: savepoint 'PTNR_BULK_CALC_TAX_PVT' never establishe d ORA-06510: PL/SQL: unhandled user-defined exception"
    So how can I get a list of active savepoints for the current session?
    Could you please also let me know if there is any better way to debug this issue.
    Appreciate any quick response as the issue is very critical.
    Thanks,
    Soma

    user776523 wrote:
    Hi,
    In Oracle Applications, we are getting the following error while performing ROLLBACK to a Savepoint.
    "Unexpected Error: ORA-01086: savepoint 'PTNR_BULK_CALC_TAX_PVT' never establishe d ORA-06510: PL/SQL: unhandled user-defined exception"It sounds like there's an execution path in the code where the SAVEPOINT is never issued.
    There is no way to get a list of active savepoints. Is this your code or a "canned" procedure? If it is your code you can go through the code looking for answers, possibly tracing execution using DBMS_OUTPUT.PUT_LINE or writing messages to a log table. If its a "canned" procedure you may need to open an SR with Oracle

  • How can i get the list of all users present in the LDAP

    Hi Experts,
    How can i get the list of all users present in the LDAP ?
    Is there any API or function Code to get all user list??
    Please help me out!!!
    Help will be rewarded

    Well it will depend on exactly where your UME configuration points to in the LDAP tree but yes, it is possible to get all users.  Something like the following should do it:
    import com.sap.security.api.*;
    import com.sapportals.portal.prt.component.*;
    IUserFactory iuf;
    ISearchResult isr;
    IUser user
    String userid;
    iuf = UMFactory.getUserFactory();
    isr = iuf.getUniqueIDs();
    you will need to iterate the ISearchResult object but you can get IUser objects by
    userid = (String)isr.next();
    user = iuf.getUser(userid);
    then you can imanipulate / identify / or whatever you need with the user object
    Haydn

  • How can i get the list of all users present in the UME ?

    Hi Experts,
    How can i get the list of all users present in the UME ?
    Is there any API or function Code to get all user list??
    Please help me out!!!
    Help will be rewarded
    -pankaj chouhan

    Hi Pankaj,
    find the official NetWeaver security javadocs (including access to UME) <a href="http://help.sap.com/javadocs/NW04S/current/se/index.html">here</a>. Look for classs UMFactory and proceed from there.
    Best regards,
    Martin

  • How can I get a list of products

    Hi!
    How can I get a list of products via java interface? I know how to get items of product (via    SBOCOMUtil.getProductTrees(company, "PcCw0001")), but which source of code list for second param?

    Should be sth like this (I have no chance to test Java code ):
    IRecordset Src_Rec;
    int i, ii;
    String str2="";
    try
      Src_Rec= SBOCOMUtil.newRecordset(aCompany);
      Src_Rec.doQuery("SELECT Code FROM OITT");
      ii = Src_Rec.getRecordCount().intValue();
      // could be a while-loop as well
      for(i =0; i< ii;i++)
        try
          str2 = Src_Rec.getFields().item(new Integer(0)).getValue().toString();
          Src_Rec.moveNext();
        catch(Exception e)
    catch(Exception e2)
    HTH,
    Frank

Maybe you are looking for