VDatabase_Table method to affect with SQL

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Sep 11 13:29:55 CDT 2008


On 9/11/08 8:52 PM, "william humphrey" <shoreagent at gmail.com> wrote:

Hi William,

> As a note for anyone who reads this later. I discovered that it is very easy
> to convert "table method" to "cursor method". Just a simple search and
> replace on "Vtable" replacing it with "VCursor" almost does everything.
> 
> So I still want to understand how to at least "sort" records in the table
> method but I realize it is probably impossible to use SQL with table method
> (so I'm using Cursor method for that).

Yes William,

I will very recommend you just go with Vcursor and SQL.
It is much more easier way.


-------------
If talk about Vtable way then you need use Vset class that keep set of found
records returned by search methods as

    VField_FindValue()
    VField_FindRange()
    VField_FindLike()

I even not sure if these methods present in V4REV. But I think they do.
Then exists Vtable.Sort() method.

This is HARD WAY, although the most effective
    (
        here again exists Ifs
        it is most effective for FAST languages as C++ / RB
        but not a fact for Revolution plugins, which are slower of RB.
    )
------------


> On 9/11/08, william humphrey <shoreagent at gmail.com> wrote:
>> 
>> Please help me figure out how to return a setRef using table methods.
>> 
>> I can do this:
>> 
>> 
>> 
>>  *put* VDatabase_Table( dbRef, "table_name") into tblRef
>> 
>> 
>> And the tblRef returned does everything fine, first record, next last even
>> go to specific record.
>> 
>> 
>> But in order to soret that result the following command is used:
>> 
>> 
>> VTable_Sort(tblRef, setRef, fldRef)
>> 
>> 
>> This hints at a "setRef" which I would really like. Some way to modify the
>> tblRef so that it isn't all the fields in the table but instead limited by a
>> SQL "WHERE"
>> 
>> 
>> I know how to do this using the Cursor method but I've already built a lot
>> of stuff with the table method assuming I would some day figure out how to
>> sort the tblRef and how to affect it with SQL but I still can't figure it
>> out.
>> 
>> 
>> Can someone please offer an example of simple RunRev valentina commands and
>> SQL that do that to the VDatabase_Table( dbRef, "table_name") ?

-- 
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]




More information about the Valentina mailing list