learn java
The moose likes JDBC and Relational Databases and the fly likes establishing jdbc connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "establishing jdbc connection" Watch "establishing jdbc connection" New topic

establishing jdbc connection

ml behra

Joined: Dec 20, 2000
Posts: 8
Hi folks,
can any body help me with jconnect.how do we establish a connection.jconnect coz we are using sybase as the database.send me some sample code if possible.
thankx in advance
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
You do it the same way that you do for any other JDBC compliant database. Here is the getConnection:
con = DriverManager.getConnection ("jdbc:sybase:Tds:" + machine + ":" + port + "/" + dbname, props);

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: establishing jdbc connection