> -----Original Message----- > > > > With mTblAlias > > Set fldPtr = .Field("PtrAlias") > > Set fldFK = .Field("CID") > > Set fldPK = mTblCountry.Field("CID") > > Call .FirstRecord > > > > Do While Not .EOF > > sKey = Trim$(fldFK.Value) > > IdRec = fldPK.FindSingle(sKey) > > > > If IdRec <> 0 Then > > fldPtr.Value = IdRec > > .UpdateRecord > > Else > > MsgBox "No " & sKey > > End If > > > > B = .NextRecord > > Loop > > > > End With > > Joakim, > > 1) am I right that you here convert FK-link to ObjectPtr link ? > it seems yes. >
Yes.
> 2) you do iteration by MANY table, and use FindSingle() to > find record in ONE table. > > This is not best way. Better do reverse: > iterate ONE table, and do FindLinked(). > Yes I understand so would be normally, but I only had 29 alias to link here and I just wanted to test. I sure do understand that Valentina has more power then I have understanding of her so far. Thanks for pointing this way out.
> > 3) But, even simpler! > > Valentina can do this operation for you. > look on method VObjectPtr.ConvertRDBLink() >
I was actually thinking of this one, but wasn't sure if it would do it, and then I got terribly hungry and had to run for a Pizza!
> also exists analog SQL command > > 4) we have no yet similar function to convert FK to BinaryLink. > in WIKI on Vlink pages, this set of tasks is named > REFACTORING of links. > We need yet develop it to get complete picture > Ok THAT would have been very useful! But I understand everything has its time, just as with life you develop and getter by years, if you want to and work on it.
Joakim
> -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina (at) lists .DOT macserve.net > http://lists.macserve.net/mailman/listinfo/valentina >
_______________________________________________ Valentina mailing list Valentina@lists.macserve.net http://lists.macserve.net/mailman/listinfo/valentina
©2006 Joakim Schramm |