V4RB2 vLink
erne
ernestogiannotta at tiscalinet.it
Mon Nov 22 21:32:12 CST 2004
hello Ruslan,
looking into new vLink class and have some questions
we create BinaryLink with DB method:
DB.CreateBinaryLink(
inName as String,
inLeftTable as VTable,
inRightTable as VTable,
[inLeftPower as Integer = 1],
[inRightPower as Integer = 0], // 1 : M
[inOnDelete as integer = 1],
[inStorageType as integer = 0], // kDefault
inTemporary as Boolean = false) As VLink
how can we delete this if we don't need it anymore?
so the vLink object knows the Tables it is linking
but when we want to find linked we must call:
vLink.FindLinked( inRecID as Integer, inTableA as VTable, inTableB as
VTable ) as VSet
why must we specify the tables here?
mmm... I see, we need specify the direction of desired link
so it could also be implemented by index as in:
vLink.FindLinked( inRecID as Integer, inTableA as Integer, inTableB as
Integer ) as VSet
after all we are required to know the Index order of linked tables if
we must link records by:
vLink.LinkRecords( inRecIDs() as Integer )
anyway, to specify the 2nd table seems redundant as we have:
vLink.DeleteLinkedRecords( inRecID as Integer, inTableA as VTable )
vLink.DeleteAllLinkedRecords( inTableA as VTable )
so it should be enough:
vLink.FindLinked( inRecID as Integer, inTableA as [VTable or Integer] )
as VSet
unless vLink will be able to link more than 2 tables in the future
in which case the LinkRecords, DeleteLinkedRecords and
DeleteAllLinkedRecords methods must be updated
What the BranchCount property indicates? Can it be more than 2?
Why the Owner must be one of the linked tables? Can't vLink live at DB
level?
What exactly Temporary means? The link will be deleted on DB.Close?
and finally, how can vLink be used via SQL?
Thanks for listening
(and, of course, for all these new supercool features :-)
Cool Runnings,
Erne.
|er| musical box
|ne| a media store
More information about the Valentina-beta
mailing list