If I am trying to delete a master record (in a master-detail relationship) whith cascading delete I get following error:
com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -198: Primary key for row in table ‘IMPORTS’ is referenced by foreign key ‘IMPORT_POSITIONS_belongingTo_FK’ in table ‘IMPORT_POSITIONS’ ASA Error -198: Primary key for row in table ‘IMPORTS’ is referenced by foreign key ‘IMPORT_POSITIONS_belongingTo_FK’ in table ‘IMPORT_POSITIONS’
It’s an automatically created relationship from my datamodel (EOModel) as mentioned in my other post to Servoy Talk today:
Check to see if the Delete checkbox is enabled under relations.
I believe Servoy doesn’t check that checkbox even though you have a on Delete constraint on the table.
I have run into this problem a long time ago.
Thanks for the hint, yes, the Delete checkbox ist checked, but I am still not able to delete the master and therefor by cascading deletion all detail records.
Best regards, Robert
ROCLASI:
Hi Robert,
Check to see if the Delete checkbox is enabled under relations.
I believe Servoy doesn’t check that checkbox even though you have a on Delete constraint on the table.
I have run into this problem a long time ago.
I tried recreate the relationship by hand and it didn’t help, either. By the way, do you know what the lock symbol left of the relationship name means?
Thanks for your help and best regards, Robert
ROCLASI:
Can you delete the record from ISQL ?
Just to rule out that any issues are in fact with the database.
Also try to recreate the servoy relation by hand and try again?
You are using Sybase right ?
ISQL is the query tool that comes with SQL Anywhere Studio (mostly known for Sybase Central)
But you can use your favorite query tool if you prefer.
Robert Huber:
By the way, do you know what the lock symbol left of the relationship name means?
It means that this relationship was created by the CREATE button and is managed on the database. You can’t edit this relationship in Servoy (other than the options).
You are using Sybase right ?
ISQL is the query tool that comes with SQL Anywhere Studio (mostly known for Sybase Central)
But you can use your favorite query tool if you prefer.
Ok, I tried to fill in the ISQL Connection information with no succes. Could you give me an example of how to set the connection information?
I assume User ID is DBA, Password is SQL, but when I press find in the Databse tab of the Connection Window, servoy_repository is found, whereas I assumed it should be the connection to the running db process? I entered the same server name as in Servoy, but that doesn’t work, so I am stuck here.
ROCLASI:
Robert Huber:
By the way, do you know what the lock symbol left of the relationship name means?
It means that this relationship was created by the CREATE button and is managed on the database. You can’t edit this relationship in Servoy (other than the options).
In the first tabpanel (Identification) you give the Username and Password of your database.
In the second tabpanel (Database) you fill in the server name (servoy_repository) and the database name (your custom db name).
Thanks, that’s what I tried, could it be that SQL Anywhere Studio 9.0.2 is the problem? I remember something… may be I should get 9.0.1?
Best regards, Robert
ROCLASI:
Hi Robert,
In the first tabpanel (Identification) you give the Username and Password of your database.
In the second tabpanel (Database) you fill in the server name (servoy_repository) and the database name (your custom db name).
You would think 9.0.2 would be able to connect to 9.0.1 services. I know databases created in 9.0.2 can’t be opened by 9.0.1 services but you would expect some backwards compatibility.
Anyway, you can download it here: http://crm.sybase.com/sybase/www/iAS/de … sp?tpl=ias
Yes, you do need to fill out the form again, unless you still have your old download link laying around.
After this form you get the download links for SQL Studio Anywhere 9.0.2. Scroll down to the bottom and you find a link to the download page for older versions. This is where you’ll find 9.0.1.
I am a bit afraid to change to the 9.0.1. version of SQL Anywhere Studio, may be gives me a lot of new problems…
I created my database manually on the terminal as described in Servoy Dev User Guide with dbinit -t … but I don’t know if I have a 9.0.2 db now or if that’s not related to the SQL Anywhere Studio. When installing the 9.0.1 version can I just remove the SQLAnywhere9 folder from Applications? What’s your experience?
Best regards, Robert
ROCLASI:
Hi Robert,
You would think 9.0.2 would be able to connect to 9.0.1 services. I know databases created in 9.0.2 can’t be opened by 9.0.1 services but you would expect some backwards compatibility.
Anyway, you can download it here: http://crm.sybase.com/sybase/www/iAS/de … sp?tpl=ias
Yes, you do need to fill out the form again, unless you still have your old download link laying around.
After this form you get the download links for SQL Studio Anywhere 9.0.2. Scroll down to the bottom and you find a link to the download page for older versions. This is where you’ll find 9.0.1.
When Sybase can open your (new) databases when you launch Servoy Developer then you have indeed 9.0.1 compatible databases.
I believe SQL Studio Anywhere does come with an uninstaller. But I believe you can indeed just remove that folder in Applications.
Just make sure that no dbsrv9 processes are running (SQL Studio Anywhere comes with it’s own database server).