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.
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?
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.
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.
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:
Delete a parent record from the native Servoy menu?
Delete a child record from the native Servoy menu?
Let me know what happens … I have additional suggestions if these tests fail.
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?