JDBC and sybase 
Author Message
 JDBC and sybase

I'd like to use a sybase database with Free TDS JDBC. I'm working under
linux with jdk 1.1.7
I have the following syntax to connect, but I have error messages.
public void connecter() {
 try {

  Class.forName("com.internetcds.jdbc.tds.Driver");

  con = DriverManager.getConnection("jdbc:odbc:casestudy", username,
password);
 } catch (Exception E) {
  System.out.println("Connection error : " + E);
 }

Quote:
}

I have : Connection error : java.sql.SQLException : No suitable driver.

Where is the problem, and what is "casetudy"?

Please, help me.

Alex.



Wed, 26 Dec 2001 03:00:00 GMT
 JDBC and sybase

Quote:

> I'd like to use a sybase database with Free TDS JDBC. I'm working under
> linux with jdk 1.1.7
> I have the following syntax to connect, but I have error messages.
> public void connecter() {
>  try {

>   Class.forName("com.internetcds.jdbc.tds.Driver");

>   con = DriverManager.getConnection("jdbc:odbc:casestudy", username,
> password);
>  } catch (Exception E) {
>   System.out.println("Connection error : " + E);
>  }
> }

> I have : Connection error : java.sql.SQLException : No suitable driver.

> Where is the problem, and what is "casetudy"?

You're loading one driver ("com.internetcds.jdbc.tds.Driver") ... apparently a native
driver, and connecting with another ("jdbc:odbc:casestudy") ... a JDBC/ODBC driver. BTW,
with this connect string you are trying to connect to an ODBC Datasource Name (DSN) of
'casestudy'.

You want to use the connect string required by the 'Free TDS JDBC', check the docs for
that driver.

--
Lee Fe{*filter*}an, FFE Software, Inc. ( http://www.***.com/ )



Wed, 26 Dec 2001 03:00:00 GMT
 JDBC and sybase
On Sat, 10 Jul 1999 19:13:51 +0200, "Alexandre Guyot"

Quote:

>I'd like to use a sybase database with Free TDS JDBC. I'm working under
>linux with jdk 1.1.7
>I have the following syntax to connect, but I have error messages.

>[...]
>  con = DriverManager.getConnection("jdbc:odbc:casestudy", username, password);
>[...]

>Please, help me.

From readme file of FreeTDS_JDBC package:

...
The name to use in the Class.forName() is
    com.internetcds.jdbc.tds.Driver
and it accepts any of the following forms of URLs-
   jdbc:freetds://servername/database
   jdbc:freetds://servername:port/database
   jdbc:freetds:sqlserver://servername/database
   jdbc:freetds:sqlserver://servername:port/database
   jdbc:freetds:sybase://servername/database
   jdbc:freetds:sybase://servername:port/database

The class com.internetcds.jdbc.tds.SybaseDriver is no longer needed
and has been retained only for backward compatibility.  It should not
be used for new code.
...



Mon, 31 Dec 2001 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. JDBC with Sybase 11 and SQL Server 7?

2. Execute a stocked procedure from Jdbc on Sybase SqlServer

3. DBVisualize and jConnect for JDBC by Sybase

4. JDBC for SYBASE

5. Help -- JDBC for Sybase?

6. JDBC and SYBASE - Best Solution jConnect or other?

7. JDBC for SYBASE SQL Server

8. Error with jConnect - JDBC for Sybase

9. problem with jdbc and sybase V12

10. linux, jdbc and sybase - oh my!

11. JDBC and Sybase


 
Powered by phpBB® Forum Software