Results 1 to 1 of 1
- 09-30-2010, 09:23 AM #1
Member
- Join Date
- Sep 2010
- Posts
- 1
- Rep Power
- 0
DSN less connection strings for ODBC
To obtain an ODBC connection, creating a DSN is not always necessary. It can be done in the following way for sybase iq db:
String url = "jdbc:odbc:Driver={Sybase IQ};Compress=NO;" +
"TCPIP{host=<IPADDRESS>;port=<PORTNUMBER>};" +
"AutoStop=YES;ServerName=<DBSERVERNAME>";
Connection con = DriverManager.getConnection(url, <USERNAME>,
<PASSWORD>);
Same can be done with most of the databases. But the property names differ for different databases. Best way to find out the property names is to create a File DSN from the ODBC administrator. The DSN file created will have the property names that can be used in the connection string.
Similar Threads
-
How to add DB connection using jdbc-odbc bridge driver
By sandysm in forum NetBeansReplies: 2Last Post: 06-30-2010, 02:00 PM -
Invalid cursor state(jdbc and odbc connection using resultset statement)
By srengvichet in forum Advanced JavaReplies: 4Last Post: 06-27-2010, 06:03 PM -
insert query in odbc
By lipun4u in forum Advanced JavaReplies: 3Last Post: 07-21-2009, 09:14 AM -
Help me this error in JDBC-ODBC connection
By lordelf in forum Java ServletReplies: 3Last Post: 04-04-2009, 08:37 AM -
without ODBC
By Heather in forum JDBCReplies: 2Last Post: 06-29-2007, 02:42 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks