[V4Rb Client] problem
Charles Yeomans
yeomans at desuetude.com
Fri Sep 12 11:22:11 CDT 2003
On Friday, September 12, 2003, at 04:27 AM, Ruslan Zasukhin wrote:
> on 9/10/03 1:18 AM, Charles Yeomans at yeomans at desuetude.com wrote:
>
>> It appears that VBaseObject.Field("RecID") still returns nil in the
>> current build.
>
> Charles,
>
> But WHY you want to use this in CLIENT ?
>
> BaseObject API should not be used in CLIENT.
VBaseObject expresses the structure of a table, and that's what I want.
Instead of hard-coding strings in my code, I can, for instance, use
Table1.SomeField.Name to get the name of a field.
I have a set of classes for building SQL queries. A DBQuery class has
methods like AddTable(theField as Field). I have a bunch of small
classes for building WHERE conditions. For example, a WHERENodeEquals
class has many constructors, overloaded by VField subtype -- for
example, WHERENodeEquals(theField as VULong, value as Integer). By
using the VField objects obtained from VBaseObject, I can get the
compiler to do the majority of my error-checking. So, for me, what's
useful is the ability to get VField objects that contain the field name
and type (as expressed by subclasses).
I agree that one should not use VBaseObject to work with database data;
indeed, I suggested that the ability to do this be removed from
VBaseObject a long time ago. But if we can't use VBaseObject to work
with database structure, then maybe V4Rb should just implement the RBDB
interface instead.
Charles Yeomans
More information about the Valentina
mailing list