Subject RE: [IBO] Data Types in IBO
Author Jack Cane
Ok, have it compiled and running. Relations tab found by clicking the Browse
Database icon, correct? Tables and System Inf. are both checked.

Selected RDB$TYPES. Showing RDB$FIELD_NAME, RDB$TYPE, RDB$TYPE_NAME,
RDB$DESCRIPTION, RDB$SYSTEM_FLAG, DB_KEY, and these are controllable in the
Field Names List tab. RDB$TYPE is a smallint, and apparently contains the
number I need. Then by selecting a table of interest, presumably the
RDB%TYPE number should be displayed?

tks,

jwc
-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Thursday, April 29, 2004 9:24 AM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] Data Types in IBO

At 09:18 AM 29/04/2004 -0400, you wrote:
>Can you point me to an example that uses the IB_SQL browser? I could not
>find a reference to it in the component palette or IBO help file.

IB_SQL is an application. The project source is in the root directory of
IBO (IB_SQL.dpr). You can either compile it yourself or download it
already compiled from the IBO website.

I only suggested using the IB_SQL browser because it gives you a good
display of the system tables. Any tool that shows you the system tables
will do, isql if you like...

Helen


>tks,
>
>jwc
>-----Original Message-----
>From: Helen Borrie [mailto:helebor@...]
>Sent: Thursday, April 29, 2004 1:50 AM
>To: IBObjects@yahoogroups.com
>Subject: Re: [IBO] Data Types in IBO
>
>At 12:36 AM 29/04/2004 -0400, you wrote:
> >My database uses TiboDatabase. I detect field names using SchemaCache
> >properties, and am trying to detect data types using db.datasets[ i
> >].fields[ j ], etc.
> >
> >I am converting some legacy code which used tIboQuery to compare
datatypes
> >with ftString, ftMemo, etc.
> >
> >My new code uses tib_column properties, where I can only find Boolean
> >properties isText, isBlob, isNumeric, etc. I am looking for a way to
> >distinguish between the old ftString and ftMemo. This is important
because
> >of the web interface, in which the controls differ between string and
memo
> >types. Better yet would be some syntax allowing me to continue using the
> >ftxx syntax with tib_column if possible.
>
>Not directly. But each prepared TIB_Column has the properties SQLType and
>SQLSubType. These are smallints corresponding to RDB$TYPE of the members
>of the enumerated type RDB$FIELD_TYPE in the system table RDB$TYPES. You
>can inspect the system tables easily in the IB_SQL browser, by checking the
>"System Inf." checkbox on the Relations tab and selecting RDB$TYPES.
>
>Only BLOBs have a value in SQLSubType: specifically, text BLOBs have 1, of
>course. The SQLType of a BLOB is 261; of a varchar(n), 37; of a char(n),
>14. So you can store a simple, static TStringlist in your application with
>strings of the format NAME=VALUE to map the SQLTypes you are interested in
>to whatever you want. For example, just bypass the VCL's ft* things
>altogether and map an sqltype directly to input tag values like <textarea>,
>etc., e.g.
>14=<text>
>261=<textarea>
>etc.
>
>Booleans are harder, since the database doesn't have boolean types; so
>IsBoolean is the only way you will be able to distinguish whether a char
>(sqltype 14) or a smallint (sqltype 7) is being used as a Boolean - and
>then only if you have told the application so by some means. You can
>simply "make up" an entry in your list for your custom Booleans, using a
>number that's not used by the database enumeration, say
>
>999=<checkbox>
>
>Helen
>
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
>keyword-searchable FAQ, community code contributions and more !
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
>keyword-searchable FAQ, community code contributions and more !
>Yahoo! Groups Links
>
>
>
>




___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Links