Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DSNless Database Connections

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
US
Hello, how can I create JDBC:ODBC connection without requiring a DSN being configured on every client system?

This is what I do now. "Support" is my local system's ODBC DSN name.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection oConnection = DriverManager.getConnection("jdbc:eek:dbc:Support");

My target environment is an Applet where the DSN would not be configured. Maybe I am missing something being new to Java???

Thanks!

Michael
 
Hi...

I recently encountered this issue myself...

The way I circumvented it was to make database connections from the server only (I set up the dsn, etc. on the server). I then wrote a component (again, on the server)that accepts TCP/IP connections from the various clients. So all the clients have to do is pass their data via TCP/IP and the component on the server handles the database connections.

DISCLOSURE: I, too, am new to Java, so I don't know if this is the preferred way to do it, or just a stupid hack because I don't know any better!

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top