Subject Re: [firebird-support] Stored Procedure Creator Problem
Author Leonardo Nakahara de Oliveira
Ok.

I found a SQL String which brings me all the tables and columns
within the Database.

SELECT
a.RDB$RELATION_NAME, b.RDB$FIELD_NAME, b.RDB$FIELD_ID,
d.RDB$TYPE_NAME, c.RDB$FIELD_LENGTH, c.RDB$FIELD_SCALE
FROM
RDB$RELATIONS a
INNER JOIN RDB$RELATION_FIELDS b ON a.RDB$RELATION_NAME =
b.RDB$RELATION_NAME
INNER JOIN RDB$FIELDS c ON b.RDB$FIELD_SOURCE = c.RDB$FIELD_NAME
INNER JOIN RDB$TYPES d ON c.RDB$FIELD_TYPE = d.RDB$TYPE
WHERE
a.RDB$SYSTEM_FLAG = 0 AND d.RDB$FIELD_NAME = 'RDB$FIELD_TYPE'
ORDER BY a.RDB$RELATION_NAME, b.RDB$FIELD_ID

But the problem is that the RDB$TYPE_NAME and RDB$FIELD_LENGTH is
quite different from what is shown in the Firebird GUI I use. There, it
shows varchar, integer, etc and when I run the SQL Script it shows
varying, long, text, int64, etc.

So, does anyone knows how to convert these types shown when i run
the SQL Script to the types shown in the Firebird GUI?

Thanks

Leonardo Nakahara de Oliveira

Goutam Paruchuri wrote:

>If you need to get the field names and table names, you can query the
>system tables RDB$RELATION_FIELDS and RDB$RELATIONS
>(do a join)
>
>Thanks !
>- Goutam
>
>
>
>
>>-----Original Message-----
>>From: Leonardo Nakahara de Oliveira [mailto:okinawadin@...]
>>Sent: Tuesday, December 28, 2004 12:54 PM
>>To: firebird-support@yahoogroups.com
>>Subject: [firebird-support] Stored Procedure Creator Problem
>>
>>
>>
>>Hello All,
>>
>> I'm using Firebird and I'm developing a Stored Procedore
>>Creator so I can make my work faster.
>>
>> But the problem is that the
>>FirebirdNETProvider-1.6.3-NET1.1 has a method which is now
>>obsolet. The method is the FbDbSchemaType Enumeration which
>>returns the data from the Tables, Columns, etc.
>>
>> Since I'm developing a Stored Procedure Creator, I need
>>my code to run over a database and return it's tables and
>>it's columns. And, returning it, I can create a loop which
>>will construct my Stored Procedures.
>>
>> Does anyone knows how to do it using another component,
>>since this is now obsolet?
>>
>> Thanks
>>
>>Leonardo Nakahara de Oliveira
>>
>>
>>
>>------------------------ Yahoo! Groups Sponsor
>>--------------------~-->
>>$4.98 domain names from Yahoo!. Register anything.
>>http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/67folB/TM
>>--------------------------------------------------------------
>>------~->
>>
>>
>>Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>Confidentiality Notice
>The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>