This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Dear all, I face a problem in jdbc. The problem is : I have a JComboBox that i want to fill it with the database sources that exist in the ODBC DataSources in the administrative tools. So please inform me how can i write the code that enable me to get all the DataSources from the odbc and filling them into the JcomboBox. Thx alot for ur help LOLO
Abed, no one here will do your work for you. What you will need to do is to at least make an attempt to write the code yourself. Then you can post here with any problems you are having getting it to work. bear Forum Bartender
This might help you: How to ask questions the right way And I guess you're a beginner. So errors are accepted. But don't email questions like this one again. The next time you aren't a beginner anymore. Instead of begging for pardon, read the article. You're welcome.
I don't think the other posters understood what you are asking for. Abed is not asking for help on "how to use JComboBox" or "how to use JDBC", rather he is asking this: How do you find all of the ODBC data sources that are configured on a Windows PC?
It sounds like Abed wants to be able to get a list of DSN's from the PC and display them in a combobox so the user can pick one. But how do you get that list using Java?
I don't know the answer but I thought it might help if I re-worded your question. Since this is specific to Windows, you may have to use a native library to get that info.
Abed just needs a starting point, e.g. "check out this API XXX" or "there is a tool called XXX that can help you". Anyone have any experience with this?
Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"
I find a solution but it's not so good from my point of view. I get all the database names that exist on the sql server path and listed them in my combobox but this is a bad way cause if anyone change this path, i will not be able to get any DSN.