Re: Accessing variable table names in Forms 4.5

From: <stevec_at_zimmer.csufresno.edu>
Date: Thu, 03 Dec 1998 16:59:03 GMT
Message-ID: <746g0l$6f5$1_at_nnrp1.dejanews.com>


In article <744fdc$rqh$1_at_newsreader5.core.theplanet.net>,   "Brighton" <someone_at_anywhere.com> wrote:
> I'd just like to say thanks to the two of you for replying so quickly. It's
> really gratifying to know there is a good community here, willing to help
> out.
>
> I've had a look at Steve's page and I'm going to try out the QA Application.
>
> The 'work-around' i've used so far is to create a SQL*Plus file called
> cre_syn.sql which contains the following
> drop synonym inv_temp;
> create synonym inv_temp for &1;
> exit
> /
> and then run this script from within Forms with a host command
> host('c:/orant/bin/plus33.exe pwd/usrnme_at_db @invtemp.sql :block.tbl_nme');
> obviously with the pwd etc replaced with our password and so on....
>
> This creates a private synonym that is then used later in the PL/SQL block
> within forms to create a consistent 'table name' to access. Bit of a bodge
> job though.

Using a synonym is great if your different tables you are accessing have the same columns. Creating a view and using the view in the form would also work.

But instead of using your SQL Plus script and the host command, use the Forms_DDL command:
  Forms_DDL('drop synonym inv_temp');
  Forms_DDL('create synonym inv_temp for '||:block.tbl_nme);

Steve Cosner
http://members.aol.com/stevec5088

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Dec 03 1998 - 17:59:03 CET

Original text of this message