File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "connetion java and topspeed database" Watch "connetion java and topspeed database" New topic
Author

connetion java and topspeed database

mesbah yahia
Greenhorn

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
Bartender

Joined: Oct 21, 2008
Posts: 1106

well i did a quick search and this might be usefull:
http://www.rgagnon.com/javadetails/java-0107.html
mesbah yahia
Greenhorn

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
("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();

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

thnak you.

Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3433
    
  47

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
Greenhorn

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 http://www.jmdoudoux.fr/java/dej/chap-jdbc.htm
user="base2";
paswd="azerty";
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: http://aspose.com/file-tools
 
subject: connetion java and topspeed database
 
Similar Threads
How to uplaod excel data into mysql data base in struts..?
UML
Topspeed INSERT statement issue
menu creation
Inheritance and Subclasses