More on V4RB 4.8.1 apps -- about Class way

Steve Albin steve at steve-albin.com
Tue Oct 15 12:52:33 CDT 2013


On Oct 15, 2013, at 1:35 PM, Ruslan Zasukhin wrote:

> On 10/11/13 11:20 PM, "Steve Albin" <steve at steve-albin.com> wrote:
> 
>> I should clarify that I am abandoning the class way for defining the database
>> tables.  I still create a subclass of VDatabase, but I don't create classes
>> for all the tables.  I find that if your VTable classes do not match your
>> database EXACTLY, then you can have problems.
> 
> Yes ... 
> 
> We did consider generation of sources from DB ..
> but somehow not easy task ...
> 
> With 5.0 Vstudio you have quite easy way to check if your classes exactly
> equal to your db schema:

I have not had time to fully explore VStudio 5 since my upgrade, but what little I've seen it is a big improvement from the 4.8 version I had been using.  This feature of checking the schema will be nice.


But still, for my purposes, I can't see the need to use the VTable class when opening the database.  Yes, for creation it is very nice but unnecessary when opening an existing database because Valentina knows already what the database looks like so I just let it tell me.  For my apps, I usually provide a database preloaded with some essential data that the user will not enter, so there is no need for an end user to create a new database.  I realize that for many applications, this will not work.

So, I just avoid the VTable classes for database access and rely on SQL called within a VCursor class.  Maybe there is some function that the VTable class would do better than SQL, but I haven't needed it with my app.

Steve


--
Steve Albin, Montclair, NJ
http://www.steve-albin.com
http://www.jazzdiscography.com




More information about the Valentina mailing list