Bug shows up only on Mac, not on Windows

Using Servoy Developer 2.2rc7 I’m running without error under WindowsXP Pro. When I install the same version on an Xserve running OS X 10.3.9 (identical solution, identical Servoy version) I get the following ASA error. As far as I’m aware the only difference is the operating system. I see no records with duplicate primary keys in the Calls table.

com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -193: Primary key for table ‘calls’ is not unique. ASA Error -193: Primary key for table ‘calls’ is not unique.

Any ideas on how to troubleshoot this? Can I safely replace the servoy/database/seven_office.db file with the Windows equivalent? NONE of these files are in production.

Morely, this doesn’t sound like a bug at all and I can’t image this being a platform dependent issue either. When do you get this error?

Sounds like you have Servoy set to generate keys on your “calls” table and the keys Servoy is inserting have already been used. Set pks to be gerated by database to fix this problem.

set database to generate keys… as Swingman says, or update table sequences so Servoy is “synced” with the existing tables. You can do this in Developer or in the server pages.

Odysseus:
set database to generate keys… as Swingman says, or update table sequences so Servoy is “synced” with the existing tables. You can do this in Developer or in the server pages.

Update table sequences? Sync Servoy with the existing tables? Set the database to generate keys? How does one do this? Additional details and references requested.

Morley:

Odysseus:
set database to generate keys… as Swingman says, or update table sequences so Servoy is “synced” with the existing tables. You can do this in Developer or in the server pages.

Update table sequences? Sync Servoy with the existing tables? Set the database to generate keys? How does one do this? Additional details and references requested.

‘Keys’ as in Primary Keys (PK).
‘Sequences’ as in the sequence of numbers used in those Primary Keys.

Anyway. To make sure your Servoy managed Primary Keys (PK) are in sync you open a webbrowser and open the admin pages (http://yourservoyserverIP:8080/servoy-admin) and go to the Database Servers section.
At each database connection you have a button to “Update All Database Sequences”

Ofcourse all this is IF you only use Servoy Managed PK’s.

Now if you have database managed PK’s then you need to do it manually in the database.
In other words check what the maximum PK is in the database and what the sequence is set to in the database. If the max. PK is higher than the sequence set in the database you need to adjust the sequence accordingly.

If you don’t know what I am talking about then talk to the DBA (Database Administrator)

Another issue ofcourse can be that Servoy thinks they are Servoy managed PK’s but in fact are database managed PK’s.
In that case you need to open Developer and set EVERY PK to be database managed.

So 3 possibilities. You should know wich applies to your situation (or at least can check for it).

Hope this helps.