Table structure?
Joakim Schramm
joakim at astrocalc.com
Sun Apr 30 20:42:00 CDT 2006
> -----Original Message-----
> From: valentina-bounces at lists.macserve.net
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of
> Joakim Schramm
Well I found!
> Ok but what I am doing wrong now, I get a cathastrofic
> automation error on the secont loop for .LinkRecords below.
> The first loop went fine and I can see the linked items in Vstudio.
>
> Set mTblPlaces = mDatabase.Table(tblPlaces) Set mLink =
> mDatabase.Link(lnkCountryPlace) ' lnkCountryPlace = const
>
> With mTblCountry
>
> If .RecordCount Then
> Set fldPK = .Field("CID")
> Set fldFK = mTblPlaces.Field("FK_CID")
> .FirstRecord
>
> Do
> IdRec = .RecID
> Set RecBitSet = fldFK.FindValue(fldPK.Value) 'As IVBitSet
> Set RecSet = RecBitSet
> Set RecItr = RecSet.MakeNewIterator
> recs(0) = .RecID
>
> With RecItr
>
> Do
> recs(1) = .Value
> Call mLink.LinkRecords(recs) <<-- crash
> here on second parent loop (RecId = 2) recs(2,1)
> Loop While .NextItem
>
I though .Value returned RecId but it's just an index of the set, from 1 to
amount. I, logically I think, assumed iterators just gave True/False as in
Table object. Maybe something to stress in documentation as all the
information make it easy to miss this thing as I did.
Joakim
> End With
>
> Loop While .NextRecord
>
> End If
>
> End With
>
> 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.macserve.net
> > http://lists.macserve.net/mailman/listinfo/valentina
> >
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
More information about the Valentina
mailing list