I started the demo.db that comes with SQL Anywhere 10, and tried to use that as the back-end database while making a front-end with Servoy. When I bring up the new solution window, I can’t see any of the existing tables. If I try to do a new table, using a table name that I know already exists, I get an error because it finds a duplicate… which means I am connecting to the right database.
If I add a new table that doesn’t already exist, it adds it successfully. I can even open Sybase Central and confirm that the table is now part of the schema. However if I close servoy and re-open, it can’t even see the table that it just created.
I can’t find anything in any of the log files that seem like a problem.
It works fine for me when I use version 9 of iAnywhere, but I need it to work for version 10, and it seems like other people on this forum have figured it out.
I have installed the same database and had the same problem.
It is not a problem in the servoy software, it is a general jdbc problem communicating with SQL anywhere 10.
For some reason the jdbc driver does not return the list of tables in the database meta data.
We have figured out what is going wrong with the DatabaseMetaData.getTables() method. In 9.0.2, truncation errors are off by default, but in 10.0.0, truncation errors are on by default. The sp_jdbc_tables metadata function is written in such a way that truncation and other errors are suppressed because jConnect cannot deal with them in the middle of metadata calls. However, some of the tables in demo.db have long comments on them and cause a truncation error; but since the error is suppressed, you don’t actually see it in your app.
We are going to fix the jConnect metadata procs to handle long comments on tables in a future EBF.
Until Sybase has released a new jdbc driver you have to set the sybase option String_rtruncation to ‘Off’
Tried it and it works.