so far, i'm connecting directly to oracle using jdbc driver and this is my connection string which works just fine
now i have a DSN from an RDB and i was wondering how the connection string would be to connect to a DSN and how the driver connection string would also be
also, what driver should be used? would that need a jdbc-odbc driver? thanks
The basic steps go like this 1) the first time Class.forName() is called it loads the class 2) when the class loads, it has a static block register itself with the DriverManager 3) When you pass a JDBC URL to the DriverManager, it asks each of the drivers it knows about if they can handle it, when one says 'yes', the DriverManager gets it to return a connection
also, what driver should be used? would that need a jdbc-odbc driver? In general you want to avoid the jdbc-odbc bridge if you can. Microsoft machines have their own generic way of talking to databases called ODBC, and the bridge is a quick and easy way to tap into this. But it only works on windows machines (more or less ) and it isn't production-ready. Also, there is usually a nice type-4 driver available for many databases.
Bernard Sigmund Gustav
Ranch Hand
Joined: Dec 20, 2005
Posts: 170
posted
0
what i originally wanted was to connect to oracle rdb from java but that proved too difficult for my knowledge and i don't have the time as of the moment to learn because i need to deploy my project. It still needed some configurations for OpenVMS and a SDK for OpenVMS alpha.
so what i did instead was to create a DSN in MSAccess for my oracle rdb schema and then have java connect to that dsn instead of directly to the rdb.so now, i don't know how to connect or what the connection string should be and what driver should be downloaded for that. i already have ojdbc14.jar but that worked for oracle dbms and not for a DSN or odbc.