problem with deletions using binary link

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Jun 29 01:43:58 CDT 2007


On 29/6/07 3:25 AM, "Dave Parizek" <david at parizek.com> wrote:

> I have 2 tables linked 1:M via binary links with deletion control set
> to CASCADE:
> 
> query = @"CREATE BINARY LINK thisLInk ON TABLES (OneTable, ManyTable)
> AS ONE TO MANY ON DELETE CASCADE";
> [mDatabase sqlExecute:query];
> 
> 
> If I delete several (but not all) records in the many table, nothing
> happens in the one table, as expected.
> 
> But if I delete the last record, or all the records, in the many
> table, then some records disappear from the one table, even though
> they should not.

> The above is in my app.  But if I open the same database, in the same
> state, in VStudio, and perform the same deletions, I do not lose any
> records from one table, even if I delete all records from the many
> table.

Hmm, then this NOT sounds like ENGINE bug.

> I can see nothing I am doing wrong as far as the deletions - I am
> using sql statements - "DELETE FROM theManyTable WHERE RecID =
> aRecID", deleting the records one at a time.
> 
> I never at any time say to delete any records from ONE table.
> 
> Do I need to unlink or something before deletion?  I thought that was
> handled automatically...

Right. No need to unlink.
 
> Any ideas?  I am uncertain as to how to even try to debug this...

So your V4CC application do set of
    DELETE FROM theManyTable WHERE RecID = aRecID

And in Vstudio you open db and do the same set of deletes,
And you get different result?

Sounds impossible.


Please add into Mantis ASAP something to test and reproduce this.
Okay ?


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list