Skip to Content.
Sympa Menu

freetds - RE: error code 08001 accompanied by "java.sql.SQLException: No suitable driver"

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Adrian Hill" <adrian.hill AT nrm-internet.net>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: RE: error code 08001 accompanied by "java.sql.SQLException: No suitable driver"
  • Date: Thu, 19 Apr 2001 09:08:56 +0100


Just had a quick look at your code. Why are you using three database
drivers? That may be the problem...

void getRecords(String SQL) {
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Class.forName("com.internetcds.jdbc.tds.SybaseDriver");
Class.forName("com.internetcds.jdbc.tds.Driver");
} catch (ClassNotFoundException fg) {
StatusLabel.setText("Failed to Load Driver: "+fg.toString());
System.out.println("Failed to Load Driver: "+fg.toString());
}

I'd use this code to connect to a MS SQL Server 7 database...

Class.forName("com.inet.tds.TdsDriver");
Connection con =
DriverManager.getConnection("jdbc:inetdae7://127.0.0.1/someDatabase", "sa",
"");
Statement stmt = con.createStatement();

// Return the raw ResultSet.
return stmt.executeQuery("SELECT * FROM someTable");

Hope this helps,


Adrian Hill.


> -----Original Message-----
> From: bounce-freetds-129830 AT franklin.oit.unc.edu
> [mailto:bounce-freetds-129830 AT franklin.oit.unc.edu]On Behalf Of Brown,
> John
> Sent: Thursday, April 19, 2001 2:18 AM
> To: TDS Development Group
> Subject: [freetds] error code 08001 accompanied by
> "java.sql.SQLException: No suitable driver"
>
>
> I'm trying to write an applet to connect to a Sysbase Sql Anywhere
> Database on an IIs (NT4) server - but so far no luck. Here's the errors I
> get:
>
> (error/vendor code) :
> "08001"
>
> accompanied by :
> "java.sql.SQLException: No suitable driver"





Archive powered by MHonArc 2.6.24.

Top of Page