Cannot delete any records in some of our Servoy forms

Dear All,

In some of our Servoy forms we are not able to delete any records using Delete methods or just clicking on Select\Delete Record nothing happens no error.

I have the full access to delete any records in both Servoy security and backend SQL Server.
However, if I login to SQL server using SA account via Enterprise Manager I am able to delete any records.

Please advice, :?

Abrahim

I have a similar problem with some records, especially new records that I am not able to delete. Please note that automatic save is disabled and this happens both with saved and non-saved new records. I must access the MySql DB to eliminate them.

Mac OS X 10.5.2
Servoy Developer 3.5.5
MySql 5.0.51a Intel

rioba:
I have a similar problem with some records, especially new records that I am not able to delete. Please note that automatic save is disabled and this happens both with saved and non-saved new records. I must access the MySql DB to eliminate them.

Mac OS X 10.5.2
Servoy Developer 3.5.5
MySql 5.0.51a Intel

Did you check if there are constraints on some relation that don’t allow parent delete?

Riccardino,

Yes I did,

Servoy Developer 3.5.5
SQL server 2000

Servoy support, any idea? :shock:

Abrahim

Me too, no constrains.

Did you really check all Servoy relations defined for the envolved table? I had the same problem: deletion was not possible, no error occurred, no message. It took me a while to find the responsible relation.

Regards

I agree with Birgit as to the probable cause. I recently had a similar situation and it turned out to be a relationship constraint (buried in a module) that was causing the delete failure. In my situation the constraint (Servoy side, not db side) was active in an included module but did not show up in the main solution/module. A constraint in a child table 2 or 3 levels down from a parent table can effectively “cascade up” and constrain delete’s.

This is a new and table with no constraint.

For this table in servoy I have :
Relationship “inner join”
allow crteation of related records
Allow parent delete when having related records

Abrahim

Abrahim,

Are both tables new or just one?

Michael

Yes,

Both tables are new.

Abrahim

A quick 5 minute test …

If you create 2 simple NEW forms with the navigator enabled:

  • one form for the parent table with one field from its columns
  • a separate form for the child table with one field from its columns

Ensure the default method functions are running - so this are very, very plain forms not relying upon the relationship implicitly via any form containers:

Are you able to:

  1. Delete a parent record from the native Servoy menu?
  2. Delete a child record from the native Servoy menu?

Let me know what happens … I have additional suggestions if these tests fail.

Michael

Michael,

Gave it try, but it didn’t work.

Thanks,

Abrahim

Hmmm … that’s interesting …

And does the same occur if you remove (temporarily) all relations that potentially touch these tables from any module or solution referenced by your parent/main solution? Is there any possibility that a relation is invoked from a separate source (I realize you stated that these are new tables)?

I also assume background issues are fine:

a) that all of the dataprovider screens look “normal” for the new tables
b) that you are in Developer when running the test (ie - removing security issues on the Servoy side)
c) that your connection strings (in Preferences, DB Servers) are identical across the tables being compared for functioning-cases and not-functioning-cases
d) that there are no table level constraints/methods running
e) autosave is running within your test environment

If you create a brand new test table in your normal way (ie - read in from the db via Servoy startup or initialized via dataproviders screen) does it also fail? This will help isolate theoretical issues attached to “hidden and constraining” relationships if you create a brand new table with no possibility of a Servoy side relationship or SQL Server side relationship. Also, any errors in the logs?

Michael

akalehzan:
Gave it try, but it didn’t work.

Please file a case in our support system so we can have a look.

Michael,

Indeed the problem was with one of the relationships that I miss to check.
All the relationships should match the below example:

Relationship "inner join" 
allow crteation of related records 
Allow parent delete when having related records

Removing and recreating them with the above setup, which fixed the problem.

I owe you lunch Michael :oops:
Thanks to everyone for all the help.
Servoy rocks 8)

Abrahim

Unfortunately I am not close enough to Stanford for that! How about you treat a friend in my stead? :lol:

Glad you found it,

Best,

Michael

Michael,

Do not push your luck :twisted:
The lunch offer is not transferable and only applies in Canada! :lol:

Best regards,

Abrahim

Sounds good! Anytime you wish to visit our city:

http://www.kelowna.ca/CM/Page641.aspx

Michael

Michael,

It looks full of nature Beauty; I may bring all my family along to visit :P

Abrahim

It’s a popular tourist destination. Nice to see you if you are up our way,

Michael