Forms 11gR1 with Database Package

Hi everyone,
I'm asking this here, i need to know what i'm doing wrong.
I have a database package that contains pipiled record.
I want to use it in a form with forms builder.
if i do
select * from table(mypackage.myfunction());
in PL/SQL Developper, i get all what i except (list of record)
if i try to use this select in a CURSOR inside my form, i get error about SQL type not authorised
with my from table();
but if i use it with a populate_group_with_query, everything works perfectly.
So, there's a way i can use my package inside a form program unit?
Thanks for your help.

No, working with collection is not like the POPLUATE_GROUP_WITH_QUERY built-in because you have to write the code to process the rows and columns of the collection.  A collection, in Oracle, is essentially an Array.
To work with a collection, you have to create an object in your trigger PL/SQL to store the collection.  To do this you create a user defined TYPE and then create an object based on this type.  Take a look at the article, https://sites.google.com/site/craigsoraclestuff/oracle-forms---how-to-s/forms-procedure-based-block for an example of how to write a database package the uses a collection as the source of data for a Forms data block.
Base on this article, in your Forms trigger you would then create an object typed off of the package type T_EMPLOYEE.  Next, you call your database package and assign the collection to your trigger object.  Finally, you loop through the collection to perform the needed action on each row.  Here is an example of the basic code using the article above as an example:
/* sample code - for demonstration purposes */
/* code is untested */
DECLARE
  rec_employees   EMPLOYEE.T_EMPLOYEE;
BEGIN
  EMPLOYEE.EMP_SELECT(rec_employees);
  FOR idx in 1 .. rec_employees.COUNT LOOP
    -- now do something with each column in the row...
    rec_employees(idx).empno ...
    rec_employees(idx).ename ...
    rec_employees(idx).job ...
    etc...
  END LOOP;
END;
Hope this helps.
Craig...

Similar Messages

  • How Connect Oracle Forms 6 With Database 11g R2

    Hello every one:
    I'm Have application made by Forms 6 and Oracle 10g, now i'm make upgrade to my DB to 11G
    but have problem when make connection between Forms 6 and 11g
    ORA-02248: invalid option for ALTER SESSION
    pls help me !!
    Thnx

    Oracle Forms 6i is not certified with Oracle RDBMS 11g and the last I read - there was no plans to certify Forms 6i with RDBMS 11g. If you search the Forums you can find some workarounds to make Forms 6i work with RDBMS 11g, but these are not Oracle Supported workarounds.
    Your only real options are to leave things as they are or upgrade both your Forms application and the database. If you opt to upgrade your Forms application, you need to upgrade your Forms application to at least Forms 10g R2 (10.1.2.0.2) to be supported.
    Craig...
    Edited by: CraigB on Jul 12, 2010 4:06 PM

  • Not able to open infopath form connected with database in sharepoint 2010

    Hi,
     I have created one infopath form which is connected with sql server database.
    Now when i am trying to open this form from sharepoint,its giving me following error:
    Please help to solve this issue.
    Thanks & Regards
    rajni

    Hello,
    If i understood you correctly, you have SP list and there are some records. Now you want to open your infopath form when clicks on add new item in the same list. I am still confuse about "from table 'Account'" this line. Are you saying that you are fetching
    records from SQL table to PS list?
    Anyway, you can modify the existing list form infopath so you could be able to open the infopath form instead of default newform.aspx page. Later you can create a new data connection in that customize form to display data in table format from same list.
    You can follow this video for connection:
    https://www.youtube.com/watch?v=6NySzgGhnaw
    http://office.microsoft.com/en-us/infopath-help/add-a-data-connection-to-a-sharepoint-document-library-or-list-HP010093160.aspx
    Let me know if i misunderstood you
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Forms 6 not connecting with Database 10g

    I can not connect Oracle forms 6 with database 10g

    795192 wrote:
    I can connect to sql plus but i cannot connect my forms 6 with database 10g. getting the following error:
    ORA-12154: TNS: could not resolve service name=================================
    ORA-12154: TNS:could not resolve the connect identifier specified
    This error means one thing, and one thing only. The client could not find the specified entry in the tnsnames.ora file being used.
    As a follow-on to that statement, remember that when you use a dblink, the database in which the link is defined is acting as a client to the database that is the target of the link. So in this case, the tnsnames.ora file on the host of your source should have an entry for your target db, as defined in the db_link.
    And for the umpteenth time ... this error has <b><i><u>NOTHING</u></i></b> to do with the status of a listener. The connection request never got far enough to reach a listener. If anyone tells you to check a listener in response to ora-12154, they are not paying attention, or do not understand how TNS works. This error is the equivalent of not being able to place a telephone call because you don't know the number of the party you want to reach. You wouldn't debug that situation by going to the other guy's house and testing his telephone, or by going to the phone company and testing the switchboard. And you don't debug a ORA-12154 by checking the listener. If I had a top ten list of "Incredibly Simple Concepts (tm)" that should be burned into the brain of everyone who claims to be an Oracle DBA, it would include "ORA-12154 Has Nothing To Do With The Listener".
    =================================
    A couple of important points.
    First, the listener is a server side only process. It's entire purpose in life is to receive requests for connections to databases and set up those connections. Once the connection is established, the listener is out of the picture. It creates the connection. It doesn't sustain the connection. One listener, with the default name of LISTENER, running from one oracle home, listening on a single port, will serve multiple database instances of multiple versions running from multiple homes. It is an unnecessary complexity to try to have multiple listeners or to name the listener as if it belongs to a particular database. That would be like the telephone company building a separate switchboard for each customer.
    Second, the tnsnames.ora file is a client side issue. It's purpose is for address resolution - the tns equivalent of the 'hosts' file further down the network stack. The only reason it exists on a host machine is because that machine can also run client processes.
    Assume you have the following in your tnsnames.ora:
    larry =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = curley)
      )Now, when you issue a connect, say like this:
    $> sqlplus scott/tiger@larrytns will look in your tnsnames.ora for an entry called 'larry'. Next, tns sends a request to (PORT = 1521) on (HOST = myhost) using (PROTOCOL = TCP), asking for a connection to (SERVICE_NAME = curley).
    Where is (HOST = myhost) on the network? When the request gets passed from tns to the next layer in the network stack, the name 'myhost' will get resolved to an IP address, either via a local 'hosts' file, via DNS, or possibly other less used mechanisms. You can also hard-code the ip address (HOST = 123.456.789.101) in the tnsnames.ora.
    Next, the request arrives at port 1521 on myhost. Hopefully, there is a listener on myhost configured to listen on port 1521, and that listener knows about SERVICE_NAME = curley. If so, you'll be connected.
    What can go wrong?
    First, there may not be an entry for 'larry' in your tnsnames. In that case you get "ORA-12154: TNS:could not resolve the connect identifier specified" No need to go looking for a problem on the host, with the listener, etc. If you can't place a telephone call because you don't know the number (can't find your telephone directory (tnsnames.ora) or can't find the party you are looking for listed in it (no entry for larry)) you don't look for problems at the telephone switchboard.
    Maybe the entry for larry was found, but myhost couldn't be resolved to an IP address (say there was no entry for myhost in the local hosts file). This will result in "ORA-12545: Connect failed because target host or object does not exist"
    Maybe there was an entry for myserver in the local hosts file, but it specified a bad IP address. This will result in "ORA-12545: Connect failed because target host or object does not exist"
    Maybe the IP was good, but there is no listener running: "ORA-12541: TNS:no listener"
    Maybe the IP was good, there is a listener at myhost, but it is listening on a different port. "ORA-12560: TNS:protocol adapter error"
    Maybe the IP was good, there is a listener at myhost, it is listening on the specified port, but doesn't know about SERVICE_NAME = curley. "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor"
    =====================================

  • Accessing database package variables from Forms

    I have a database package that populates a table of values, i.e.
    type t_route_list is table of rt_route.RTR_ID%type;
    route_list t_route_list
    route_list gets populated by a package function and I want to access route_list in the Form.
    While I can access other package variables by writing a function that returns the variable, Forms doesnt seem to like functions that return a user defined datatype as above. I have also tried using a procedure with an OUT param instead of a function but it also fails with same error.
    i.e.
    declare
    v_route_list pkg_bulk_route_replace.t_route_list;
    begin
    pkg_bulk_route_replace.init;
    pkg_bulk_route_replace.get_route_list(v_route_list);
    message(v_route_list(1));
    end;
    This will not compile, but removing the index (1) from the last line makes it compile but crash with ORA-0600.
    The code above with message replaced with dbms_out.put_line works fine on TOAD.
    So my question is......
    Can my database package return a plsql table to a form and if so, how?!

    Actually I've got this to work now!
    Thde main culprit appears to be a difference in the version of sql or pl/sql used on forms (version 5) and the database (8.1.7).
    I had defined my table as a nested table. By redefining this as a indexed table, simply by adding on 'index by binary_integer' on my server package, I am suddenly able to access the elements of the table on my form. Fortunately this did not break the server code either - the table was populated using bulk collect and that still works.
    Still got a bit of coding to do, but things are looking up now.

  • Form created with Livecycle Designer with a SQL database - do you need LiveCycle Forms installed?

    Hello,
    I'm REALLY hoping someone here can help me, I have spent over four hours on the phone to Adobe in the last 3 days and I'm getting no where what-so-ever. I can't even find out where /how to complain about it! (but thats another story)
    Here's my situtation:
    I work for a company with approx 140 staff. On one computer, we have Adobe Livecycle Designer ES installed, and we have used that program to create a form which has a link to a SQL database.
    The link in this form doesn't work on the other computers which has the basic (free) Adobe Reader. From doing research within these forums
     , I have found that the form will not work on other computers unless they have Adobe Livecycle forms installed on their machines. 
    What I need to know (and what they cannot seem to tell me when I call), is two things:
    Is it correct that in order to use a form created in Livecycle Designer which has a link to a SQL database, that the machine must have LiveCycle forms installed?
    How much does Adobe LiveCycle Forms costs?
    PLEASE, if you can answer this question, I would REALLY appriciate it....
    Thank you!

    I presume you are asking if you need Livecycle Forms ES? Forms ES is a component of the livecycle software suite intended as a document service which will be installed on a server within the organisation. A couple of things this document service can do is to render XDP into multiple formats (PDF, html, etc.), execute script server side (for example the database connection) on behalf of the client (reader, etc.), integrate with backend components, etc. So no you do not install this on each client.
    For database connections to work, you either have a server with Forms ES installed which can connect on each clients behalf (ie. Client->Forms ES Server->Database), or you have a reader-extended PDF to allow connections to be use in the free basic Reader (i.e. direct calls to the database or using web service calls to your own database components). However, reader-extended pdf would probably require Reader Extensions ES component installed on a server (you once off extend your developed pdf through this and then hand it out to each of the end users). Not sure if the Acrobat Reader extensions will cover this functionality since I have not tried that. I dont think it does. Otherwise you would need full acrobat on each client.
    How much database integration is your form actually doing at the moment? read only? Full access? And how many clients do you expect to hit your database? Depending on what you need the form to do, there is always the option to try and build the integration yourself. Do simple http submits from the browser (hosting reader as a plugin) to some component somewhere which in turn hits your database. Wouldnt require additional licensing but alot more development work.
    As for cost for the various components, thats a question only Adobe can answer for you since they all sit squarely in the enterprise space and licensing for that is not as simple as off the shelf products.
    Maybe someone else has a view on it or has an alternative.

  • Problem to connect Developer Suite forms 9 with Oracle 9i Database

    Hi,
    I have a problem to connect Developer Suite Release 2 forms 9 with Oracle 9i database release 1. I have done net8 easy configuration but no success. Can any one help me to solve this problem.
    Thanks in Advance
    Nasir Ali Mughal

    We cannot help if you don't give us the error number that you get.
    Also something that you might want to do is to search this error number on OTN.

  • Problem Connecting Developer Suite Form 9 with Oracle 9i Database

    Hi,
    I have a problem to connect Developer Suite Release 2 forms 9 with Oracle 9i database release 1. I have done net8 easy configuration but no success. The error is ORA-12514 TNS: Listener could not resolve SERVICE_NAME given in connect descriptor. I am not using any application server. Can any one help me to solve this problem.
    Thanks in Advance
    Nasir Ali Mughal

    Configure the net configuration for both 9idb and 9ids in the same way. Make sure the TNSlisner is started.

  • Generate report with data from database package

    Hi
    Is it possible to generate a report where the values come from an oracle database package instead of from an sql query declared in the report itself?
    If yes, how is it done?
    Appreciate any help. Thx.

    Hi,
    You can use REF CURSORs to generate reports from a database package.
    For information about REF CURSORs, please see Chapter 40 'Building a Paper Report with REF CURSORs' of the Oracle Reports Building Reports manual.
    This chapter is at:
    http://download-uk.oracle.com/docs/html/B13895_01/orbr_refcur.htm#i1011693
    Hope this helps.
    Regards,
    Panna

  • How to connect oracle forms 6i with .odb database

    Hai,
    I need to connect oracle forms 6i with .odb database.
    What are the software i need to install.
    tell me the steps hoe to connect the oracle forms6i with .odb database

    I must say honestly that I got a little ticked when you have mentioned .odb is oracle lite.You should mention the complete name of the software whichever it may be as its not at all mandatory,everyone would know the acronym.
    Anyways,a quick search revealed this.
    Connect Forms 6i application to Oracle 10g Lite database on notebook
    I have not worked in Oracle lite at all.So I can't help much in it.But as per the thread,it wont be a straight connectivity.I would suggest you contact Support
    Aman....

  • Web form not updating database with stored procedure

    Hello
    i have a problem with the web form updating the database i have a stored procedure which i need to connect to. If i execute the procedure in the SQL it will update the database but when i run the web form i get my catch error "could not update database".
    I have read so much on the net and my code seem ok but i,m just so lost.
    stored procedure
    PROCEDURE [dbo].[UpdateCustomer]
    @ID INT,
    @Firstname VARCHAR(30),
    @Surname VARCHAR(30),
    @Age INT
    AS
    BEGIN
    UPDATE Customer
    SET Firstname = @Firstname,
    Surname = @Surname,
    Age = @Age
    WHERE CustID = @ID
    END
    update code
    try
    SqlCommand command = new SqlCommand();
    command.Connection = conn;
    command.CommandType = CommandType.StoredProcedure;
    command.CommandText = "UpdateCustomer";
    command.Connection.Open();
    SqlParameter param = new SqlParameter();
    param.ParameterName = "@ID";
    param.SqlDbType = SqlDbType.Int;
    param.Direction = ParameterDirection.Input;
    param.Value = txtCustID.Text;
    command.Parameters.Add(param);
    command.Parameters.AddWithValue("@CustID", txtCustID.Text.ToString());
    command.Parameters.AddWithValue("@Firstname", txtFirstname.Text);
    command.Parameters.AddWithValue("@Surname", txtSurname.Text);
    command.Parameters.AddWithValue("@Gender", Gender.Text.ToString());
    command.Parameters.AddWithValue("@Age" ,txtAge.Text.ToString());
    command.Parameters.AddWithValue("@Address1", txtAddress1.Text.ToString());
    command.Parameters.AddWithValue("@Address2", txtAddress2.Text.ToString());
    command.Parameters.AddWithValue("@City", txtCity.Text.ToString());
    command.Parameters.AddWithValue("@Phone", txtPhone.Text.ToString());
    command.Parameters.AddWithValue("@Mobile", txtMobile.Text.ToString());
    command.Parameters.AddWithValue("@Email", txtEmail.Text.ToString());
    command.ExecuteNonQuery();
    lblMessage.Text = "Your Record(s) Have been Updated";
    command.Connection.Close();
    catch
    lblMessage.Text = "Your Record was not updated please try again";
    Thank you for your help

    To expand on Mike's advice.
    Change your catch to:
    catch(Exception ex)
    { // Break point here
    lblMessage.Text = "Your Record was not updated please try again";
    Put a break point in where the comment says.
    Run it.
    Hover over ex or add a quickwatch ( right click it ) and see what the error and inner exception is.
    I see several problems though.
    You have way too many parameters and Age should be int.
    They are objects  - they have a type.
    It'll be a string with your code there.
    Something more like
    command.Parameters.Add("@Age", SqlDbType.Int);
    command.Parameters["@Age"].Value = Convert.ToInt32(txtAge.Text);
    Although that might not cut and paste, it's air code intended to give you the idea.
    Hope that helps.
    Technet articles: Uneventful MVVM;
    All my Technet Articles

  • Service Form interface with RACF DB2 Databases

    We are looking for a way to have service form interface with RACF using DB2 connect. This function is needed to perform data validation against mainframe system. Any advice or instructions of how to implement this is greatly appreciated.

    I am using Weblogic workshop test browser to test this code. My Ws code looks like this.
    package WebServ;
    public class AsyncWebServ1 implements com.bea.jws.WebService
    * @common:control
    * @jc:timer repeats-every="30 s" timeout="60 s"
    private com.bea.control.TimerControl MyTimerControl;
    * This member variable stores the client choice to be sent a callback or not.
    public boolean m_useCallback;
    * When the callback handler is fired, this boolean is set to true.
    * Clients that don't want callbacks check this boolean to see if their result is ready.
    public boolean m_messageIsReceived;
    public Callback callback;
    * @common:control
    private Control.xmlDocWSControl xmldocwscontrol;
    static final long serialVersionUID = 1L;
    private String xmlString = "";
    private String strName = "";
    * @common:operation
    * @jws:conversation phase="start"
    public void getWSEmplyeeInfoCON(String aName)
    MyTimerControl.start();
    xmlString = xmldocwscontrol.getEmplyeeDtlsCon(aName);
    return ;
    public interface Callback extends com.bea.control.ServiceControl
    * @jws:conversation phase="finish"
    public void testCallback(String result);
    * @common:operation
    public void MyTimerControl_onTimeout(long time)
    //xmlString = xmldocwscontrol.getEmplyeeDtlsCon(aName);
    if(!m_useCallback)
    m_messageIsReceived = true;
    else
    callback.testCallback(xmlString);
    MyTimerControl.stop();
    return;
    * @common:operation
    * @jws:conversation phase="continue"
    * @jws:protocol form-post="false" form-get="true"
    public boolean checkStatus()
    return m_messageIsReceived;
    * @common:operation
    * @jws:conversation phase="finish"
    * @jws:protocol form-get="true" form-post="false"
    public String getMessageResponse()
    return xmlString;
    * @common:operation
    * @jws:conversation phase="start"
    public void requestMessage(boolean useCallback)
    m_useCallback = useCallback;
    // Start the delay timer.
    MyTimerControl.start();
    return;
    The value of xmlString can be hard coded.
    Saju

  • Is Forms 10g certified with Database 11g?

    Hi:
    Does anybody know if Forms 10G is certified with Oracle Database 11g?
    Regards
    Ricardo

    This should help Certification of Forms 10G against database 11G

  • Getting Business Catalyst Forms working with Muse in Webmarketing Package

    Hi All,
    I am having problems with forms using BC Webmarketing packaging and Muse.
    When I past the html code for the BC form into a Muse page then upload it I get the following error message
    http://www.virtualteacher.com.au/images/error-webform.jpg
    and the web form is deleted from my Business Catalyst web Forms list.
    What is the best solution for integration between BC and Muse.
    I want to be continually updating aspects of both.
    Can I quarantine some BC pages that Muse will not update?
    Any suggestions would be great.
    ciao
    Cathy

    Hi Sanjit,
    The problem is that when I update the Muse template page with the BC code
    {tag_pagecontent}
    The Business Catalyst template it is  based on this doesn't update or screws up the page.
    Registration
    The form is there as I have used it a number of times but the template page doesn't load properly
    ciao
    Cathy

  • [b]How can i connect with database(oracle 9i) from form developer at runtim

    Hi Friends,
    My problem is as follows, please show me a way.
    Let's asume, I have form (developed in 6i) which has database data block. Now, at form level a have assigned on_logon trigger and I have written the following PL/SQL statement in that trigger:
    begin
    null;
    end;
    So, when I run this form without connecting to database It does not prompt for a connection. Now I have button lebeled as "Connect" in this form, when user will click on it it will display a window having text boxes to enter user name, password and database name; once the user fill those text boxes and click on a button lebeled as "Ok" then the form runtime environment should be connected with database as per information provided by user. Here to mention that the user already been created, only the connection will be stablished. For example: I want to connect the form with database as "scott/tiger@oradata9i".
    To do this, what PL/SQL command statement should i write in that "OK" button's "when_button_pressed" trigger?
    If any of you know about this please help me.

    Hi
    I've answered this question already. If I understand you right, you can use 'LOGON' built-in of Forms. Take a look into documentation.

Maybe you are looking for

  • Driver issue msi gtx 560 ti hawk

    Which driver to use with msi 560 ti hawk currently using 275.33 but after installing battlefield 3 the game freezes in just 5 minutes of the gameplay the game requires latest drivers 285.xx from nvidia should i update to the latest driver from nvidia

  • Editing iPhoto pic in Photoshop Elements 4

    I have read the messages of mainman and Dr. Livingstone regarding this issue and the replies but I do not have any option of choosing Photoshop Elements 4 in Preferences/General/Edit Photo which shows only "In Man Window", "Full Screen" "in Separate

  • Error when copying the folder Manager Self-Service in the portal

    Good Night. I am implementing  Employee Self-Service and Manager Self-Service For ESS i did  the following: 1. I  created a new folder for my project. 2. I copied  Employee Self-Service folder from the standard part into my folder. 3. I deleted the p

  • SMB Sharing

    When I enable SMB sharing on Leopard so that I can access my mac files from Vista, my Vista computer can see everything on my mac hard drive...I mean everything! I have tried limiting which files/folders to share on my mac, but it has no effect. Is a

  • HT1338 my screen won't hold the color I chose

    My screen won't hold the color I chose, keeps turning yellow