VBinaryLink delete bug
Ruslan Zasukhin
ruslan_zasukhin at valentina-db.com
Mon Jun 15 01:30:35 CDT 2009
On 6/15/09 4:41 AM, "Ernesto Giannotta" <ernestogiannotta at tiscalinet.it>
wrote:
Hi Erne,
> I have a many to many Binary link set like this:
>
> // make the link
> mCatNotesLink = new VBinaryLink("Link_Categories_Notes",
> mCategories, mNotes, EVLinkType.kMany, EVLinkType.kMany,
> EVOnDelete.kSetNull)
>
> Now when I delete the last record in the mCategories table (which is
> the owner of the link) like this:
Owner?
* For M:M link, Owner have no sense usually.
* Yes, we still have provide ability specify Owner for M:M and 1:1 links.
But above I do not see that you have specify Owner in code
> dim SqlString as String
>
> SqlString = "Delete From " + me.Name
> SqlString = SqlString + " Where Recid = " + Str(inRecid)
>
> Call me.Database.SqlExecute(SqlString)
Better show FINAL SQL command.
>From this RB code it is not clear what exactly command you get,
Although I guess which
DELETE FROM Categories WHERE RecID = XXXX
> also all the linked records of the mNotes table are deleted!
>
> This happens only if I delete the last record of the owner table
>
> Workaround is to unlink all records before deleting the last owner's
> record
>
> I'll try to make a simple demo to submit via Mantis.
Yes, please Mantis it
--
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