my dog learned polymorphism
The moose likes JDBC and Relational Databases and the fly likes connetion java and topspeed database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "connetion java and topspeed database" Watch "connetion java and topspeed database" New topic

connetion java and topspeed database

mesbah yahia

Joined: Mar 19, 2012
Posts: 7
hello, i need your help

I don't use clarion, my project object is using java to acces to Topspeeddatabase which is created before,

i need to know how to connect java to topspeed database.

source code :
Class.forName("what is the class name??");

Cnx = DriverManager.getConnection(url,user,paswd);

thank you.
Wendy Gibbons

Joined: Oct 21, 2008
Posts: 1107

well i did a quick search and this might be usefull:
mesbah yahia

Joined: Mar 19, 2012
Posts: 7
thank you for your post,

i know how to connect java to other database (oracle ,postgres...ect) my problem is how to connect it to topspeed database,

in your link i find this :

Driver d = (Driver)Class.forName

with what i have to replace the class name :sun.jdbc.odbc.JdbcOdbcDriver to connect to topspeed database.

thnak you.

Martin Vajsar

Joined: Aug 22, 2010
Posts: 3718

Please read the other thread in which you posted identical question. That thread mentions that there is no specific driver for TopSpeed, and therefore you need to use JDBC-ODBC bridge.

Wendy has provided you with a page which shows what to put into the Class.forName call to use ODBC. The thread I already mentioned seems to contain other info you could find useful.
mesbah yahia

Joined: Mar 19, 2012
Posts: 7
thank's for your replay,

i read all the thread and i did the same thing but i still got the same error : [error connexion null ]

here is my source code:

try {

Driver d = (Driver)Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
url = "jdbc:odbc:base2"; // is the data source systeme (soft velocity topspeed driver "version 4.0") like 41.3 in
Cnx = DriverManager.getConnection(url,user,paswd);

req= "select * from base1"; // name of the TPS file (base1 is protected by password and contain a list of tables ) //

res = st.executeQuery(req);

}catch (Exception e){
JOptionPane.showMessageDialog(null, "erreur de connexion \n"+e.getMessage());

I agree. Here's the link:
subject: connetion java and topspeed database
It's not a secret anymore!