• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC-ODBC Drivers ...Again

 
Subramanian Parlikkad
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is anybody there? It would be great help if somebody would answer my earlier post. I need to list all the ODBC drivers and System DSNs in a system using Java-JDBC? Any ideas??
 
Monty Ireland
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try
http://java/sun/com/products/jdbc
catch
List Drivers Available
hope this helps....

------------------
We learn more from our mistake's than from our success's.

[This message has been edited by Monty Ireland (edited October 18, 2000).]
 
Subramanian Parlikkad
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My question was 'what API should I use to list the ODBC drivers registered in a server from a Java application'.
 
Joe Paolangeli
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not tried this out but you can get an enumeration of drivers through the DriverManager class. There is a static method named "getDrivers()" that will handle this.
 
Subramanian Parlikkad
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DriverManager.getDrivers() only returns the drivers that are loaded earlier using class.forname(xx). I want the list of all drivers and DSNs in the system(server). In VB one uses SQLDrivers API to do this. I want a similar JDBC API in Java.
[This message has been edited by Subramanian Parlikkad (edited October 27, 2000).]
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since drivers are simply classes, aren't registered with anything, and don't even have to directly be on the classpath, how would Java know which drivers even exist on the server?
[This message has been edited by Thomas Paul (edited October 30, 2000).]
 
Monty Ireland
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
say again...
unless you are using the jdbc-odbc driver that comes with the standard jdk. you have to put a vendors __.zip or __.jar file within you CLASSPATH. Otherwise you will an exception...
this post has show to me that ... we all need to review
some tutorials and/or read a good book...
this a basic stuff here ...
it is not rocket science...



[This message has been edited by Monty Ireland (edited November 03, 2000).]
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, Monty, I see that maturity is not your strong point. If you can not post according to the guidelines, you will be banned.
Just to correct you, many vendors (Sybase for example) supply their classes as classes in addition to supplying them as a jar or zip file. This is what I meant when I said that the classes don't have to be "DIRECTLY" on the classpath. They could be many directories off the classpath.
But this does not change the answer to the question which is that Java does not know what JBDC drivers are available on the server. It can only tell you what drivers are registered.
[This message has been edited by Thomas Paul (edited October 31, 2000).]
 
Monty Ireland
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We learn more from our mistake's than from our success's.
...
Do NOT get bend out of shape one this one...
I did not mean to offend anyone.
...
6 months ago I would not have recieved a reply like this one...
...
I will try to be more P.C. next time.
...
I'm here to learn and help others...
SeeYa Later Partner
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic