Connection to ms sql server with osx

I am trying to connect to an ms sql server 2000 db from osx 10.4.

I have tried both the open source and the microsoft jdbc driver, and even a third one.

I can connect to the db but I always get the same error message :
com.servoy.j2db.persistence.RepositoryException: Cannot work without primaryKey on table ‘xxxxxx’

Thank you for your help,
Francis

Hi Francis,

Can you check if that table has indeed a primary key column defined?
Servoy needs some unique row indentifier to access the data.

Hope this helps.

I should of course have mentioned that those tables have primary keys.

Are you really sure those tables have a primary key (constraint), not just a identity column? Under indexes/keys of those tables you should see something like “PK_xxxx”.

Unfortunately, there is a primary key constraint.

I also thought it could be Java 1.5 so I switched back to 1.4.2 but I still have the problem.

Maybe you can run this with a stack trace turned on. I work with SQL Server for years and never had a problem.

I have made some more tests. The problem seems to be related to the ownership of the table.

I usually log into SQL server as sa and I have in fact no pb with tables owned by dbo. My pbs are with tables owned by another user, a public user.

My problem is that I do not have the password of this user.
But shouldn’t I be allowed to do everything as sa ?

Any ideas to overcome the pb ?

I think that depends on the roles that the database is using. Check the roles / users on this particular database.

Are you using the JTDS Driver (jtds.sourceforge.net) ?

What happens if you use an external query program, like Aqua Data Studio (aquafold.com)? Does it show primary keys on the tables?