Re: How to get the ddl of a table in forms?

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 19 Jan 2006 12:55:44 -0800
Message-ID: <1137704134.202737_at_jetspin.drizzle.com>


mentor1936 wrote:
> Hi,
>
>
>
> This is my first posting to this forum.
>
> I am using forms 6i and 9i database for testing purpose on windows O/S.
>
>
> I want to develop a small form application for getting the structure of
> any table in a particular schema.
>
>
>
> My Application will be based on the following scenario:
>
> In order to achieve what I am wanting, I am planning to use two display
> screens in a form's block with a ddl button.
>
> For Example After populating all the tables of Scott's schema in
> screen no: 1, I highlight the Scott's EMP table then I click the ddl
> button in order to get the ddl of that table in a screen no: 2.
>
>
>
> In this regard I like to ask the following:
>
> 1. What is the sql/technique for getting the ddl of any table in
> the database?

dbms_metadata.get_ddl('TABLE', <table_name>);

You can find working demos in Morgan's Library at www.psoug.org.

> 2. How should the table name of a particular schema display in a
> screen no: 1 so when the control goes to any table in a screen no: 1,
> the ddl of that table will be displayed after pressing the ddl button?

That's up to you.

> 3. What technique I adopt and how should I implement it in forms
> in order to display the ddl of a table in forms screen no: 2 when I
> click the ddl Button?

Again ... up to you. Make a decision.

> Please give me your ideas and suggestion in order to accomplish what I
> am wanting.
>
> Related codes will also be helpful form me.
>
> John

You'll find the DBMS_METADATA code in Morgan's Library. How you choose to implement the displays is your class project ... not ours.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Thu Jan 19 2006 - 21:55:44 CET

Original text of this message