cancel
Showing results for 
Search instead for 
Did you mean: 

Jconnect v7 and sql anywhere v5.5

Former Member
0 Kudos
3,883

I have a rather old dbms, SQL Anywhere v5.5, running on an even older operating system, OS/2. It is past time to rewrite the business application that uses the database to another language, in this case I thought Java would be cool. Later on I could migrate the dbms to something more modern.

The initial exploration of jconnect (v7) seemed to indicate that it could connect with the old database version. So far I have had no success.

Here is the connection string: "jdbc:sybase:Tds:sma-server1.sma.com:1498/smadb1"

It yields the error: "java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused"

Port 1498 is what the SA dbclient program uses to communicate with the database. The app talks to the client which acts as an agent between the app and the dbms.

This is actually promising since all of the preliminary bits have succeeded. I suspect the "connection refused" part is because the connection must be UDP-based, not TCP. I do not know what to change to cause UDP to be preferred for a connection. I also suspect that the protocol "Tds" may not be appropriate but I cannot find info on what protocols are acceptable.

Any suggestions (besides moving to a newer version of SQL Anywhere)?

Former Member
0 Kudos

Never mind. I discovered the "rebuild" database option.

Another question still in the spirit of the subject for this thread. I have installed a demo version of SQLAnywhere v12 and have connected to it using the rebuilt database. The nascent application, though, is not totally happy with the result. All of the queries returns this:

java.sql.SQLException: JZ0BT: The last() method is not supported for ResultSets of type TYPE_FORWARD_ONLY.

A typical query is: select max(t1.invoice_no) from sma_admin.ordr_dat t1;

What do I do to open the database in a non-TYPE_FORWARD_ONLY manner?

MarkCulp
Participant
0 Kudos

Please post this as a new question - Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

MarkCulp
Participant
0 Kudos

SQL Anywhere 5.5 did not support TDS (the protocol used by jConnect). Support for TDS was added in SQL Anywhere 6. Volker suggestion is on the right track - load the database on a newer server - a 5.5 database can be started on SQL Anywhere versions up to v9. If you do not have a copy of v9 you may have difficulty getting one since v9 is EOLed.

An alternative solution is to download a copy of SQL Anywhere v12 (which is the latest active codeline) and convert your database to a v12 database - the v12 software has all of the components needed for you to do this.

You can get a developers version of SQL Anywhere 12 by going here to register.

BTW if you do use a new version (e.g. you get your hands on v9 or upgrade to v12) then you should try using the iAnywhere JDBC driver since it uses SQL Anywhere 'native' protocol and may give you better performance (depending on your application).

VolkerBarth
Contributor
0 Kudos

Note that you can run a SQL Anywhere 5.5 database on a SQL Anywhere 9 database engine (i.e. dbeng9 or dbsrv9). That will make it easier (or doable at all?) to connect via JDBC/jConnect, and you will find much more information on how to connect to a v9 and above database server from JDBC. You might even try to use the SQL Anywhere JDBC drivers instead of jConnect.

Former Member
0 Kudos

Where can I find the distribution for SQL Anywhere 9?

Would the database file be acceptable to v10 or later also?

MarkCulp
Participant
0 Kudos

SQL Anywhere v10 and up cannot directly use a v5.5 database - it must be converted to a v10 format database in order to be used.