Win a copy of The Java Performance Companion this week in the Performance forum!
    Bookmark Topic Watch Topic
  • New Topic

Topspeed INSERT statement issue

 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is a long shot, but does anybody here have Topspeed/Clarion experience? I'm trying to write an insert statement to insert data into a TopSpeed .TPS file, but I'm receiving the following error:

We are trying to export data from SQL Server to a Clarion/Topspeed .tps file, but the DTS in SQL Server produced the same error message. So I scripted the data and am trying to insert it through a SQL Query interface (Aqua Data Studio). We got 3 of the four files to go in OK, but the Users file is causing us grief.
The insert statement follows (it's long, but not complex):
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hmm--- near as I can tell, the problem was that the statement was just too darn long. Since were were inserting zeros mostly anyway, I just cut the statement back to those fields that were actually populated and it worked.
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
Although this thread is [very] old and is probably not of much interest to most people, I am lead to believe that there is at least one person out there interested in knowing how I connected to a Top Speed database when there is no JDBC driver for Top Speed. This was not a problem, as Top Speed does have an ODBC driver. I created an ODBC driver for Top Speed, then used the JDBC-ODBC bridge driver for my Java connection.

Hope that this helps anybody unfortunate enough to have to be using TopSpeed.
 
Victor Espinoza
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Joel McNary wrote:Although this thread is [very] old and is probably not of much interest to most people, I am lead to believe that there is at least one person out there interested in knowing how I connected to a Top Speed database when there is no JDBC driver for Top Speed. This was not a problem, as Top Speed does have an ODBC driver. I created an ODBC driver for Top Speed, then used the JDBC-ODBC bridge driver for my Java connection.

Hope that this helps anybody unfortunate enough to have to be using TopSpeed.


I Joel, can you please tell me where is it that you have this JDBC-ODBC bridge driver for TOP Speed. Thanks I will appreciate it, if you answer me.
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
The JDBC-ODBC driver is the class sun.jdbc.odbc.JdbcOdbcDriver and is part of the standard java distribution. A Google search for that will provide the necessary information for using it.
 
Sergio Vera
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Joel, I'm one of those unfortunated people who has to use Topspeed. I was looking harder for someone who could help me out, but there is not much information about it. I tried to connect my java app to a TopSpeed table, in order to do that i created a "user dsn" using the Topspeed ODBC and the JDBC-ODBC bridge, the source code for my url is as follows:



This works, it seems the app can connect to the ODBC through the bridge, but the problem is when i want to connect with the DSN. I'm not sure which attribute i should use, but i tried with the following:



where "examples" is the user DSN created before and "EXAMPLE.tps" is the .tps table. The connection seems allright, but when i want to make a simple SELECT statement like "SELECT * FROM pacientes", the application throws the exception "[SoftVelocity Inc.][TopSpeed ODBC Driver][ISAM]ISAM Table Not Found". The curious thing is that even if i don't create any DSN the connection to the ODBC succeeds... but just the connection, because i can't do anything with the data. If you could help me i will really appreciate it. Thanks.
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Report post to moderator
Can you try:


 
Sergio Vera
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
Jan Cumps wrote:Can you try:




Too simple... and effective, it really worked, thank you very much!!!
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Report post to moderator
... and Welcome to JavaRanch, Sergio.
 
mesbah yahia
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Report post to moderator
hello,i have an other problem

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);

please replay, i need your help.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
As this question has been cross-posted elsewhere, this topic has been closed.
 
    Bookmark Topic Watch Topic
  • New Topic