Tableschema

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Nov 5 07:59:47 CST 2007


On 5/11/07 3:02 PM, "Mr. Bart Pietercil" <bart.pietercil at gmail.com> wrote:

Hi Bart,

> I'm having trouble finding the correct way to read a database schema.
> 
> I thought there was a call aDB.tableschema that would return an array
> of tablenames,
> but I only found tablecount which I use to traverse the schema.

Well, this is RBDB API.
Can glitch. 

> Problem is that this code also seems to find sys tables (it found
> sysItems).
> 
> So what is the way to read the schema of a DB (prefer classway) from
> within RB ?

1) API way

    count = db.TableCount
    loop 
       tbl = db.Table(i)

2) SQL

    SHOW TABLES


Yes we return sys tables also, you need add own filter to check flag of
Vtable.IsSytem.

In SQL way also possible filter records using

    SELECT ... 
    FROM (SHOW TABLES)
    WHERE

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