the scope of Virtual fields
Elizabeth Robar
erobar at earthlink.net
Fri Jan 24 16:33:20 CST 2003
Hi, all. Just to introduce myself, I'm a Visual Basic/Access/SQL
Server programmer who's had to turn to REALBasic and Valentina in order
to cater to the Mac world. For better or worse, here I am!
I'm working with a database with multiple related entities (through
VObjectPtr's) and am trying to figure out the best way to access the
data. As I understand it, I can make an old-style cursor (SELECT *
FROM baseobject1, baseobject 2) and access mycursor.Field(1,
2...).GetString(), or I can take advantage of the Valentina objects for
REALBasic and instantiate my baseobjects and directly access their
values (mybaseobject.myfield.value). The problem comes in wanting to
elegantly retrieve data from 2 or more baseobjects at once: do I have
to use a cursor (or 2 VBaseObjects set to the appropriate records), or
is it possible to make a Virtual Field in baseobject1 that actually
retrieves data from baseobject2? I guess I'm really asking the scope
of Virtual fields in BaseObjects: can they only refer to fields within
that baseobject (e.g. FullName = CONCATE(FirstName, ' ', LastName)), or
is it possible to have them refer to fields in another (related)
baseobject? I'd like to have a setup with
baseobject1:
fielda
fieldb
fieldc (VObjectPtr to baseobject2)
fieldd = SELECT fieldx FROM baseobject2
baseobject2:
fieldx
fieldy
fieldz
Is such a thing possible?
Many thanks in advance,
Liz
More information about the Valentina
mailing list