This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Can't connect to remote sql server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Can Watch "Can New topic

Can't connect to remote sql server

James Ajewole

Joined: Apr 02, 2003
Posts: 19
I wrote a simple progam to connect to an sql server database and run a query but i'm getting an error "Exception in thread main Java.sql.sqlexception: No suitable driver. can anyone help me out. or do i have to create an odbc connection and use it for connecting to the sql server?
Lu Battist
Ranch Hand

Joined: Feb 17, 2003
Posts: 104
Please include your database connection code especially the driver and connection url you are trying to use and which kind of database it is (Oracle, MS Access, mySql, Db2, etc).
Grishma Dube
Ranch Hand

Joined: Jul 01, 2003
Posts: 275
I assumed you are using oracle type 4 jdbc driver.
You simply put or in you classpath and in some you have to rename this zip file to jar file and it will work.
Hope it helps.
James Ajewole

Joined: Apr 02, 2003
Posts: 19
i'm trying to connect to sql server and im using the connection string that goes like this
do i need to download a special driver?
Have you checked out Aspose?
subject: Can't connect to remote sql server
It's not a secret anymore!