Home » Developer & Programmer » Forms » Dynamic table in form (6i)
Dynamic table in form [message #536701] Thu, 22 December 2011 04:34 Go to next message
Tomcrzy
Messages: 101
Registered: December 2011
Location: Chennai,India
Senior Member

Hi,


Can anyone help me to create a table in forms .
i tried to do it with forms_table(--) but i am in confusion.

Re: Dynamic table in form [message #536702 is a reply to message #536701] Thu, 22 December 2011 04:38 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why would you want to create a table from a form? Generally speaking, this is a wrong approach. In Oracle, create table once (using SQL*Plus or similar client) and use it many times (from a form, for example). People whose background is MS SQL Server, this is strange but hey - that's how Oracle works. You don't need to create/drop tables on-the-fly.

So - why do you need to create a table from a form?

P.S. Is it possible? Certainly it is! Use FORMS_DDL built-in.
Re: Dynamic table in form [message #536703 is a reply to message #536702] Thu, 22 December 2011 04:43 Go to previous messageGo to next message
Tomcrzy
Messages: 101
Registered: December 2011
Location: Chennai,India
Senior Member

In situations like end user does not aware about sql and he is using the form just for creating a table

i will specify what i am actually need

a block for entering table name
and one or two set of blocks for column details

eg:-one for columnname and other two are for datatype and length

user -after entering these details by pressing a button table should created...

please help me to get this
Re: Dynamic table in form [message #536705 is a reply to message #536703] Thu, 22 December 2011 04:45 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Heh? Why should an end user create tables in the first place?!? What would he do with that table?

Anyway: FORMS_DDL again (just in case you didn't see it previously).
Re: Dynamic table in form [message #536711 is a reply to message #536705] Thu, 22 December 2011 05:10 Go to previous message
Tomcrzy
Messages: 101
Registered: December 2011
Location: Chennai,India
Senior Member

Thanks little foot

i missed to do the quotes

forms_ddl('create table '||:b.tablename||'('||:b.col1||' '||:b.datatype1||'('||:b.length1||'),'||:b.col2||' '||:b.datatype2||'('||:b.length2||'))');
Previous Topic: It's big problem
Next Topic: Variable can't hold 4000 characters
Goto Forum:
  


Current Time: Thu Jul 25 21:30:34 CDT 2024