Function that returns currently selected cell address or column

Is there a function that returns the address (or just the column) of the currently selected cell? Simply put, something like =selectedcolumn.
Background: I want to display help text in a cell, and I want that help text to change according to which cell (actually, which column) the user has selected. I have put the help texts in a hidden row. They take up too much space to be displayed all the time. I want one cell to contain the help text of the column of the currently selected cell.
Trying to not use Filemaker for this project if possible
Thanks for any help /Matt

The Numbers method, using comments as Barry showed, is probably the best method.  An alternate method which is more complex would be to use an Applescript running in the background.  The Applescript can scan in the background for which cell/column is currently selected and write that cell/column address into a cell in your table. A formula in your table (most likely a lookup formula) can use that address to serve up the correct help text in a diffrerent cell in the table or in another table.
Some problems with this methodare
The script is not part of the document. It is a separate entity.
The script must be started manually. It will not automatically start when the Numbers document is opened.
If the Numbers document is to be used on other Macs, each would also need the script installed.

Similar Messages

  • SOLVED: How can I use or call a function that returns %ROWTYPE?

    Hi
    edit: you can probably skip all this guff and go straight to the bottom...In the end this is probably just a question of how to use a function that returns a %rowtype.  Thanks.
    Currently reading Feuerstein's tome, 5th ed. I've downloaded and run the file genaa.sp, which is a code generator. Specifically, you feed it a table name and it generates code (package header and package body) that will create a cache of the specified table's contents.
    So, I ran:
    HR@XE> @"C:\Documents and Settings\Jason\My Documents\Work\SQL\OPP5.WEB.CODE\OPP5.WEB.CODE\genaa.sp"
    749  /
    Procedure created.
    HR@XE> exec genaa('EMPLOYEES');which generated a nice bunch of code, viz:
    create or replace package EMPLOYEES_cache is
        function onerow ( EMPLOYEE_ID_in IN HR.EMPLOYEES.EMPLOYEE_ID%TYPE) return HR.EMPLOYEES%ROWTYPE;
        function onerow_by_EMP_EMAIL_UK (EMAIL_in IN HR.EMPLOYEES.EMAIL%TYPE) return HR.EMPLOYEES%ROWTYPE;
        procedure test;
    end EMPLOYEES_cache;
    create or replace package body EMPLOYEES_cache is
        TYPE EMPLOYEES_aat IS TABLE OF HR.EMPLOYEES%ROWTYPE INDEX BY PLS_INTEGER;
        EMP_EMP_ID_PK_aa EMPLOYEES_aat;
        TYPE EMP_EMAIL_UK_aat IS TABLE OF HR.EMPLOYEES.EMPLOYEE_ID%TYPE INDEX BY HR.EMPLOYEES.EMAIL%TYPE;
        EMP_EMAIL_UK_aa EMP_EMAIL_UK_aat;
        function onerow ( EMPLOYEE_ID_in IN HR.EMPLOYEES.EMPLOYEE_ID%TYPE)
            return HR.EMPLOYEES%ROWTYPE is
            begin
                return EMP_EMP_ID_PK_aa (EMPLOYEE_ID_in);
            end;
        function onerow_by_EMP_EMAIL_UK (EMAIL_in IN HR.EMPLOYEES.EMAIL%TYPE)
            return HR.EMPLOYEES%ROWTYPE is
            begin
                return EMP_EMP_ID_PK_aa (EMP_EMAIL_UK_aa (EMAIL_in));
            end;
        procedure load_arrays is
            begin
                FOR rec IN (SELECT * FROM HR.EMPLOYEES)
                LOOP
                    EMP_EMP_ID_PK_aa(rec.EMPLOYEE_ID) := rec;
                    EMP_EMAIL_UK_aa(rec.EMAIL) := rec.EMPLOYEE_ID;
                end loop;
            END load_arrays;
        procedure test is
            pky_rec HR.EMPLOYEES%ROWTYPE;
            EMP_EMAIL_UK_aa_rec HR.EMPLOYEES%ROWTYPE;
            begin
                for rec in (select * from HR.EMPLOYEES) loop
                    pky_rec := onerow (rec.EMPLOYEE_ID);
                    EMP_EMAIL_UK_aa_rec := onerow_by_EMP_EMAIL_UK (rec.EMAIL);
                    if rec.EMPLOYEE_ID = EMP_EMAIL_UK_aa_rec.EMPLOYEE_ID then
                        dbms_output.put_line ('EMP_EMAIL_UK  lookup OK');
                    else
                        dbms_output.put_line ('EMP_EMAIL_UK  lookup NOT OK');
                    end if;
                end loop;
            end test;
        BEGIN
            load_arrays;
        end EMPLOYEES_cache;
    /which I have run successfully:
    HR@XE> @"C:\Documents and Settings\Jason\My Documents\Work\SQL\EMPLOYEES_CACHE.sql"
    Package created.
    Package body created.I am now trying to use the functionality within the package.
    I have figured out that the section
        BEGIN
            load_arrays;
        end EMPLOYEES_cache;
    /is the initialization section, and my understanding is that this is supposed to run when any of the package variables or functions are referenced. Is that correct?
    With that in mind, I'm trying to call the onerow() function, but it's not working:
    HR@XE> select onerow(100) from dual;
    select onerow(100) from dual
    ERROR at line 1:
    ORA-00904: "ONEROW": invalid identifier
    HR@XE> select employees_cache.onerow(100) from dual;
    select employees_cache.onerow(100) from dual
    ERROR at line 1:
    ORA-06553: PLS-801: internal error [55018]
    HR@XE> select table(employees_cache.onerow(100)) from dual;
    select table(employees_cache.onerow(100)) from dual
    ERROR at line 1:
    ORA-00936: missing expressionHe provides the code genaa.sp, and a very brief description of what it does, but doesn't tell us how to run the generated code!
    Now, I have just done some googling, and it seems that what I am trying to do isn't possible. Apparently %ROWTYPE is PL/SQL, and not understood by SQL, so you can't call onerow() from sql. Correct?
    So I try wrapping the call in an exec:
    HR@XE> exec select employees_cache.onerow(100) from dual;
    BEGIN select employees_cache.onerow(100) from dual; END;
    ERROR at line 1:
    ORA-06550: line 1, column 30:
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 7:
    PLS-00428: an INTO clause is expected in this SELECT statement
    HR@XE> exec select table(employees_cache.onerow(100)) from dual;
    BEGIN select table(employees_cache.onerow(100)) from dual; END;
    ERROR at line 1:
    ORA-06550: line 1, column 14:
    PL/SQL: ORA-00936: missing expression
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    HR@XE> exec employees_cache.onerow(100)
    BEGIN employees_cache.onerow(100); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00221: 'ONEROW' is not a procedure or is undefined
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignoredNo joy.
    Of course, now that I'm looking at it again, it seems that the way to go is indicated by the first error:
    PLS-00428: an INTO clause is expected in this SELECT statement
    So am I supposed to create a type of EMPLOYEES%ROWTYPE in a PL/SQL procedure, and the idea of this code, is that the first call to onerow() runs the initialiation code, which populates the cache, and all subsequent calls to onerow() (whether by my session or any other) will use the cache?
    I've had a stab at this, but still, no joy:
    create or replace procedure testcache is
        emp employees%rowtype;
        begin
            select employees_cache.onerow(100) from dual into emp;
            dbms_output.put_line('Emp id: ' || emp.employee_id);
        end testcache;
    show errors
    HR@XE> @testcache.sql
    Warning: Procedure created with compilation errors.
    Errors for PROCEDURE TESTCACHE:
    LINE/COL ERROR
    4/9      PL/SQL: SQL Statement ignored
    4/54     PL/SQL: ORA-00933: SQL command not properly ended
    HR@XE>Have a feeling this should be really easy. Can anybody help?
    Many thanks in advance.
    Jason
    Edited by: 942375 on 08-Feb-2013 11:45

    >
    Ha, figured it out
    >
    Hopefully you also figured out that the example is just that: a technical example of how to use certain Oracle functionality. Unfortunately it is also an example of what you should NOT do in an actual application.
    That code isn't scaleable, uses expensive PGA memory, has no limit on the amount of memory that might be used and, contrary to your belief will result in EVERY SESSION HAVING ITS OWN CACHE of exactly the same data if the session even touches that package.
    Mr. Feuerstein is an expert in SQL and PL/SQL and his books cover virtually all of the functionality available. He also does an excellent job of providing examples to illustrate how that functionality can be combined and used. But the bulk of those examples are intended solely to illustrate the 'technical' aspects of the technology. They do not necessarily reflect best practices and they often do not address performance or other issues that need to be considered when actually using those techniques in a particular application. The examples show WHAT can be done but not necessarily WHEN or even IF a given technique should be used.
    It is up to the reader to learn the advantages and disadvantages of each technicalogical piece and determine when and how to use them.
    >
    Now, I have just done some googling, and it seems that what I am trying to do isn't possible. Apparently %ROWTYPE is PL/SQL, and not understood by SQL, so you can't call onerow() from sql. Correct?
    >
    That is correct. To be used by SQL you would need to create SQL types using the CREATE TYPE syntax. Currently that syntax does not support anything similar to %ROWTYPE.
    >
    So am I supposed to create a type of EMPLOYEES%ROWTYPE in a PL/SQL procedure, and the idea of this code, is that the first call to onerow() runs the initialiation code, which populates the cache, and all subsequent calls to onerow() (whether by my session or any other) will use the cache?
    >
    NO! That is a common misconception. Each session has its own set of package variables. Any session that touches that package will cause the entire EMPLOYEES table to be queried and stored in a new associative array specifically for that session.
    That duplicates the cache for each session using the package. So while there might be some marginal benefit for a single session to cache data like that the benefit usually disappears if multiple sessions are involved.
    The main use case that I am aware of where such caching has benefit is during ETL processing of staged data when the processing of each record is too complex to be done in SQL and the records need to be BULK loaded and the data manipulated in a loop. Then using an associative array as a lookup table to quickly get a small amount of data can be effective. And if the ETL procedure is being processed in parallel (meaning different sessions) then for a small lookup array the additional memory use is tolerable.
    Mitigating against that is the fact that:
    1. Such frequently used data that you might store in the array is likely to be cached by Oracle in the buffer cache anyway
    2. Newer versions of Oracle now have more than one cache
    3. The SQL query needed to get the data from the table will use a bind variable that eliminates repeated hard parsing.
    4. The cursor and the buffer caches ARE SHARED by multiple sessions globally.
    So the short story is that there would rarely be a use case where ARRAYs like that would be preferred over accessing the data from the table.

  • Get Current Selected Cell Value in an af:table

    Using JDeveloper 11.1.1.3.0
    I currently have a requirement where i need to call a server method and pass the value of the current selected Cell value in my af:table.
    The reason why i can't just make use of the currentSelectedRow is because i have a set of Columns (NumericValue1,NumericValue12,...NumericValue1n) and my server method can't really tell which cell i picked.
    So far, what i did is that i utilized F. Nimphius's article about using contextMenu and passing a clientAttribute.
    Re: How to pass parameter to inline popup when mouse over
    I'm hoping to do the same thing but without raising a popup on right click. So basically, i'm hoping to select an outputText in the table and this value will be stored in a pageFlowScopeBean.
    Has anybody encountered something similar?
    Thanks.

    Hi Barbara,
    You're aproach sounds intersting.
    So you mean to say, i'll create a component which has a bindings to my pageDefinition which needs to have it's clientComponent attribute set to true i believe so that my javascript can find this component.
    Then, i'll write a javascript that handles the focus event which then stores the clientAttribute value and stores that in the hidden component mentioned earlier. I'm guessing that once i set the newValue to the hidden component, it should be posted to the pageDef bindings upon hitting server side calls.
    I'll try this out and give an update on it.

  • Function that returns N values, without using a string

    Hi, how can i make a function that returns several valures (that hasn't a exact number of returned values, it could return 3 values, or 7) without using a string?
    When i need to return several values from a function, i put the values inside a varchar like thus 'XXX,YYY,ZZZ' and so on. Don't know if this has a poor performance.
    If you can supply simple examples for what im asking, i would be nice.
    (without using a string)

    Can i create the type objects inside a package? If i
    can, they will be local to the package, right?Yes, you're right.
    Pipeline returns a row or several?You can use pipelined function in the same way you use table:
    SELECT * FROM TABLE(pipelined_funct(agr1, agr2));
    It returns results as separate rows.

  • Error with function that returns a rowtype...

    i have a function that returns a rowtype. below is a simplified version:
    create or replace function "GETC"
    return mytable%rowtype
    is
    rec mytable%rowtype;
    begin
    rec.rowid := 1;
    return rec;
    end;
    eventually i'll want to call this from java. but for now i'd settle for calling it from the XE web front end (and sqlplus).
    SQLPLUS: i try to call it from sqlplus by first declaring a variable where i can store the return:
    var a mytable%rowtype;
    it instantly stops me saying that i can only declare a var of a particular type. so what do i do?
    XE interface: i tried various ways to call getc(), but they were all unsuccessful. what should i be doing?
    thanks so much for your time.
    marko

    Given a function like this:
    CREATE OR REPLACE FUNCTION get_employee
         ( p_empno emp.empno%TYPE )
         RETURN emp%ROWTYPE
    AS
         v_result emp%ROWTYPE;
    BEGIN
         SELECT * INTO v_result
         FROM   emp
         WHERE  empno = p_empno;
         RETURN v_result;
    END get_employee;You can call it within PL/SQL like this:
    DECLARE
         rec emp%ROWTYPE;
    BEGIN
         rec := get_employee(7902);
         DBMS_OUTPUT.PUT_LINE(rec.ename);
    END;However,
    1. Unless there is a column named "ROWID" in the table (unlikely since it would conflict with the actual rowid and is therefore not allowed), the type will not have an attribute named "rowid".
    2. "1" would not be a valid rowid anyway.
    3. %ROWTYPE defines a PL/SQL type, which will not be recognised in other environments such as SQL and Java.

  • I get an error when i try to execute a function that returns a date value

    Hi,
    I'm new in ODP.NET, i'm make a package that contains a function that returns a date i.e.
    Package Body General_pkg is
    Function Get_Day Return Date is
    vd_day date;
    Begin
    select sysdate into vd_day from dual;
    return vd_day;
    end Get_Day;
    End General_pkg;
    i use the next code to execute the function:
    OracleCommand cmdData = new OracleCommand("General_pkg.Get_Day", cnx);
    cmdData.CommandType = Commandtype.StoredProcedure;
    OracleParameter PRM;
    PRM = new OracleParameter();
    PRM.ParameterName = "VDATE";
    PRM.OracleDbType = OracleDbType.Date;
    PRM.Direction = ParameterDirection.ReturnValue;
    cmdData.Parameters.Add(PRM);
    try
    cmdData.ExecuteNonQuery();
    catch(OracleException e);
    When i execute this code, i have and exception, which say "identifier GENERAL_PKG.Get_Day must be declare..."
    Obviously the package is correctly created in ORACLE i tested first in sql plus and it works but in ODP.NET they don't recognize the package or the function i don't know... please help!!!

    OOOOOPSS.... i forgot that i change the user in my conecction string that's why it didn't work...
    i guess i had to much beer last night.;. :)
    thanks.

  • NCo 3 crashes when invoking functions that return a time field

    I'm using NCo 3 (.NET 2 target framework) with Visual Studio 2010. When I invoke a function that returns time fields (like BAPI_ALM_ORDER_GET_DETAIL) NCo crashes with the following message:
    SAP.Middleware.Connector.RfcTypeConversionException: Cannot convert 240000 into TIME (HHmmss)
    I'm currently using NCo version 3.0.0.42. Is there a newer version? Obviously this is a bug inside the NCo library which I can't fix from the outside rendering the connector almost useless.
    Is this a known problem? Does anyone know if it is already fixed in newer revisions of NCo?

    I'm using NCo 3.02 (.NET 4 target framework) with Visual Studio 2010.
    When I invoke a function that returns date fields (like BAPI_SALESORDER_GETLIST) NCo crashes with the following message:
    SAP.Middleware.Connector.RfcTypeConversionException: Cannot convert DOCDATE....
    Below is the code I'm using:
                  Dim customer_orderAPI As IRfcFunction = ecc.Repository.CreateFunction("BAPISALESORDER_GETLIST")
                    customer_orderAPI.SetValue("CUSTOMER_NUMBER", "0000020000")
                    customer_orderAPI.SetValue("SALES_ORGANIZATION", "ARCO")
                    customer_orderAPI.SetParameterActive("MATERIAL", False)
                    customer_orderAPI.SetParameterActive("DOCUMENT_DATE", False)
                    customer_orderAPI.SetParameterActive("DOCUMENT_DATE_TO", False)
                    customer_orderAPI.SetParameterActive("PURCHASE_ORDER", False)
                    customer_orderAPI.SetParameterActive("TRANSACTION_GROUP", False)
                    customer_orderAPI.SetParameterActive("PURCHASE_ORDER_NUMBER", False)
                    customer_orderAPI.SetParameterActive("MATERIAL_EVG", False)
                    customer_orderAPI.Invoke(_ecc)   'I receive the error in this line
                    Dim table As IRfcTable = customer_orderAPI.GetTable("SALES_ORDERS")
                    Dim returnCode As String = customer_orderAPI.GetStructure("RETURN").GetString("TYPE")
                    If (returnCode.Equals("E") Or returnCode.Equals("A")) Then
                        Console.WriteLine(customer_orderAPI.GetStructure("RETURN").GetString("MESSAGE"))
                    Else
                        Console.WriteLine("*********** SUCCESS **********")
                        Console.WriteLine("Number of orders is .", table.RowCount)
                    End If
    Does anyone know what is the issue and how to fix it?

  • Is there any function that returns the latest DDL statement

    can anyone tell me if there is any FUNCTION that returns latest DDL statement performed in a schema.
    OR
    if there is any TABLE that will be populated with latest
    DDL statement in schema.
    THANK YOU.

    The table all_objects (and/or dba_objects) contains a column called last_ddl_time. Thus, a query like
    scott@jcave > SELECT max(last_ddl_time)
      2  FROM all_objects
      3 WHERE owner = 'SCOTT';
    MAX(LAST_DDL_TI
    28-NOV-03will tell you the last time any object owned by SCOTT had DDL issued against it.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

  • How to define a function that returns a void?

    Hi all,
    How can I define a custom function that returns a void?
    My understanding is simple UDF can only return a string.
    Is there any way around this limitation?
    Thanks.
    Ron

    > Hi,
    > User Defined Function in XI always return a String.
    >
    > If you requirement is that you want to perfrom some
    > operation in an user defined function, one option is
    > to move it to the Java Section in your mapping and do
    > it in the intialization / clean up section.
    >
    > Else, wite a UDF that will return a Blank string as
    > the output, and map it to the root node of the
    > target.
    >
    Hi all,
    Thank you all for your kind responses.
    The scenario I have is I need to insert the value of a particular field into a database table. E.g. MessageId, to keep track of the messages going through XI.
    Naturally, such operations return void. These operations are already encapsulated in a custom jar file.
    My purpose of using a UDF is solely to invoke the operation.
    But I realized I each UDF has to have a return type, and the output of this UDF must be mapped to a node in the outgoing message.
    Currently, my UDF returns an empty string, by using the implementation as below, I manage to perform my desired operation without affecting the result:
    MessageId -- UDF -- CONCAT -
    InstitutionCD_Transformed
    InstitutionCode_____
    But as you can see, this is not an elegant way of doing things.
    That's why I'm seeking alternative solutions for this problem.
    Bhavesh, you mentioned something about doing the operation in the initialization/cleanup section.
    Can you please explain more?
    Thanks.
    Ron

  • Problem with a simple function that return a number

    Hi,
    I'm writing a function that return a number. I receive always an error (invalid number) but I don't understand why.
    The function is this:
    >
    FUNCTION COUNT_OBJECT(workflow_name_p IN NUMBER, object_type_p IN VARCHAR2) RETURN NUMBER
    IS
    object_inserted NUMBER;
    BEGIN
    object_inserted := 0;
    IF workflow_name_p = 'AIMDailyIngestorWorkflow'
    THEN
    object_inserted := 1;
    else
    object_inserted := 100;
    END IF;
    RETURN object_inserted;
    END COUNT_OBJECT;
    I have left only an if and an assignment because I do not find the error.
    When I execute the function I receive always this error:
    ORA-01722: invalid number
    01722. 00000 - "invalid number"
    *Cause:   
    *Action:
    There are not operation, only assignment I cannot understand.
    Could someone help me?
    Thanks bye bye.

    I changed in this way:
    FUNCTION COUNT_OBJECT(workflow_name_p IN VARCHAR2, object_type_p IN VARCHAR2) RETURN NUMBER
    IS
    object_present NUMBER;
    object_inserted NUMBER;
    table_name_p VARCHAR2(4000);
    query_stmt VARCHAR2(4000);
    BEGIN
    IF workflow_name_p = 'AIMDailyIngestorWorkflow'
    THEN
    SELECT SUM(B.STOREDOBJS) INTO object_present
    FROM DPCTJOBTYPESTATS B
    WHERE B.WORKFLOW_NAME = workflow_name_p AND B.OBJTYPE=object_type_p;
    SELECT 'AIM.'||B.TABLE_NAME INTO table_name_p
    FROM DPCTSWOBJTYPE B
    WHERE B.OBJTYPE=object_type_p AND SOFTWARE='AIM';
    EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' || table_name_p || ';' INTO object_inserted;
    object_inserted := object_inserted - object_present;
    END IF;
    RETURN object_inserted;
    END COUNT_OBJECT;and now the error is:
    ORA-00911: invalid character
    ORA-06512: at "INFRA.WORKFLOW_STATISTICS", line 504
    00911. 00000 - "invalid character"
    *Cause:    identifiers may not start with any ASCII character other than
    letters and numbers. $#_ are also allowed after the first
    character. Identifiers enclosed by doublequotes may contain
    any character other than a doublequote. Alternative quotes
    (q'#...#') cannot use spaces, tabs, or carriage returns as
    delimiters. For all other contexts, consult the SQL Language
    Reference Manual.
    but the line 504 is the blank line higlighted with the ***.
    Why this error? The code seems correct.
    Thanks, bye bye.

  • Function that returns the date/time ?

    We would like to make a validation in the Activity status based on the activity End Time.
    Pls... is there a function that returns something that I could compare with: "8/6/2009 01:00 PM" ?
    I know of Today but I understand that today() returns just the day (no time).
    Txs.
    Antonio

    Hi Antonio,
    You can try using the function -: Timestamp()
    To quote the CRM On Demand help files...
    "+The Timestamp function in Expression Builder returns the server date and time converted to the current user's time zone setting. For example, if the current user's time zone setting is set to Eastern Daylight Time (EDT) -0400 UTC, the Timestamp function converts the server time to EDT. The TimeStamp function performs UTC (universal time code) conversion. NOTE: Arithmetic operations (for example, add or subtract) are not supported with the Timestamp() function.+"
    Hope this helps.
    Regards,
    Cameron

  • Deploy resulset of PL\SQL function, that returns ANYTABLE%TYPE

    How can deploy resulset of PL\SQL function, that returns ANYTABLE%TYPE in SQL?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by angelrip:
    Hello everyone,
    I've come through the following problem:
    1.- I created an PL/SQL stored procedure which returns a REF CURSOR element, definition looks like this:
    PACKAGE PKG_LISTADOS AS
    TYPE tuplas IS REF CURSOR;
    /* Procedimientos exportados por el paquete */
    PROCEDURE inicializarModuloListados;
    FUNCTION recaudacionUltimoMes(medioPago DEF_MEDIO_PAGO.MEDIO_PAGO%TYPE)
    RETURN tuplas;
    2.- Now I would like to call the stored procedure and retrieve the PL/SQL cursor as a ResultSet Java Object. The code I wrote is this:
    Connection conn;
    XmlDocument paramDef;
    conn=poolMgr.getConnection str_poolDBConnection);
    try
    CallableStatement cstmt=conn.prepareCall("{?=call PKG_LISTADOS.recaudacionUltimoMes(?)}");
    cstmt.registerOutParameter(1, java.sql.Types.OTHER);
    cstmt.setString(2, "MONEDA");
    cstmt.executeQuery();
    ResultSet rs=(ResultSet)cstmt.getObject(1);
    catch(SQLException sqlE)
    3.- However, I can't make it OK, all the time I get the following error:
    SQL Error(17004), java.sql.SQLException: Non valid column type
    May anyone help me with this, thanks in advance:
    Miguel-Angel<HR></BLOCKQUOTE>
    Do something like the following:
    cstmt = conn.prepareCall("{call customer_proc(?, ?)}");
    //Set the first parameter
    cstmt.setInt(1, 40);
    //Register to get the Cursor parameter back from the procedure
    cstmt.registerOutParameter(2, OracleTypes.CURSOR);
    cstmt.execute();
    ResultSet cursor = ((OracleCallableStatement)cstmt).getCursor(2);
    while(cursor.next())
    System.out.println("CUSTOMER NAME: " + cursor.getString(1));
    System.out.println("CUSTOMER AGE: " + cursor.getInt(2));
    cursor.close();
    null

  • NCo 3.02 crashes when invoking functions that return a date field

    I'm using NCo 3.02 (.NET 4 target framework) with Visual Studio 2010.
    When I invoke a function that returns date fields (like BAPI_SALESORDER_GETLIST) NCo crashes with the following message:
    SAP.Middleware.Connector.RfcTypeConversionException: Cannot convert DOCDATE....
    Below is the code I'm using:
    Dim customer_orderAPI As IRfcFunction = ecc.Repository.CreateFunction("BAPISALESORDER_GETLIST")
    customer_orderAPI.SetValue("CUSTOMER_NUMBER", "0000020000")
    customer_orderAPI.SetValue("SALES_ORGANIZATION", "ARCO")
    customer_orderAPI.SetParameterActive("MATERIAL", False)
    customer_orderAPI.SetParameterActive("DOCUMENT_DATE", False)
    customer_orderAPI.SetParameterActive("DOCUMENT_DATE_TO", False)
    customer_orderAPI.SetParameterActive("PURCHASE_ORDER", False)
    customer_orderAPI.SetParameterActive("TRANSACTION_GROUP", False)
    customer_orderAPI.SetParameterActive("PURCHASE_ORDER_NUMBER", False)
    customer_orderAPI.SetParameterActive("MATERIAL_EVG", False)
    customer_orderAPI.Invoke(_ecc)                ' >>>>  I receive the error in this line
    Dim table As IRfcTable = customer_orderAPI.GetTable("SALES_ORDERS")
    Dim returnCode As String = customer_orderAPI.GetStructure("RETURN").GetString("TYPE")
    If (returnCode.Equals("E") Or returnCode.Equals("A")) Then
    Console.WriteLine(customer_orderAPI.GetStructure("RETURN").GetString("MESSAGE"))
    Else
    Console.WriteLine("*********** SUCCESS **********")
    Console.WriteLine("Number of orders is .", table.RowCount)
    End If
    Does anyone know what is the issue and how to fix it?

    I'm using NCo 3.02 (.NET 4 target framework) with Visual Studio 2010.
    When I invoke a function that returns date fields (like BAPI_SALESORDER_GETLIST) NCo crashes with the following message:
    SAP.Middleware.Connector.RfcTypeConversionException: Cannot convert DOCDATE....
    Below is the code I'm using:
    Dim customer_orderAPI As IRfcFunction = ecc.Repository.CreateFunction("BAPISALESORDER_GETLIST")
    customer_orderAPI.SetValue("CUSTOMER_NUMBER", "0000020000")
    customer_orderAPI.SetValue("SALES_ORGANIZATION", "ARCO")
    customer_orderAPI.SetParameterActive("MATERIAL", False)
    customer_orderAPI.SetParameterActive("DOCUMENT_DATE", False)
    customer_orderAPI.SetParameterActive("DOCUMENT_DATE_TO", False)
    customer_orderAPI.SetParameterActive("PURCHASE_ORDER", False)
    customer_orderAPI.SetParameterActive("TRANSACTION_GROUP", False)
    customer_orderAPI.SetParameterActive("PURCHASE_ORDER_NUMBER", False)
    customer_orderAPI.SetParameterActive("MATERIAL_EVG", False)
    customer_orderAPI.Invoke(_ecc)                ' >>>>  I receive the error in this line
    Dim table As IRfcTable = customer_orderAPI.GetTable("SALES_ORDERS")
    Dim returnCode As String = customer_orderAPI.GetStructure("RETURN").GetString("TYPE")
    If (returnCode.Equals("E") Or returnCode.Equals("A")) Then
    Console.WriteLine(customer_orderAPI.GetStructure("RETURN").GetString("MESSAGE"))
    Else
    Console.WriteLine("*********** SUCCESS **********")
    Console.WriteLine("Number of orders is .", table.RowCount)
    End If
    Does anyone know what is the issue and how to fix it?

  • Highlight Current/selected cell in Calender

    Hi,
    How can I highlight current / Selected Cell in Calender ?
    Im using calender with link as like in Denes application: http://htmldb.oracle.com/pls/otn/f?p=31517:40
    But I cannot highlight the clicked/selected cell.
    Regards,
    Benz

    Any clue ? ..

  • Select function that returns multiple columns.

    Currently I have a function that will return 1 column and I can use that in a select statement. What I need is to return multiple columns from a table. In the function I have I return the street address from a table that holds information about dealers, I need to be able to also return the columns that contain the city, state, and zip code so it can be used in an sql select statement. How would I do this?
    My function:
    FUNCTION GET_ADDRESS(dealer_id IN number)
    RETURN tbl_dealer_info.c_street%TYPE AS
    v_rc tbl_dealer_info.c_street%TYPE;
    CURSOR get_dealer_cur IS
    SELECT c_street
    FROM tbl_dealer_info
    WHERE n_dealer_id = dealer_id;
    BEGIN
    v_rc := NULL;
    OPEN get_dealer_cur;
    FETCH get_dealer_cur INTO v_rc;
    IF get_dealer_cur%NOTFOUND THEN
    NULL;
    END IF;
    CLOSE get_dealer_cur;
    RETURN v_rc;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN NULL;
    END GET_ADDRESS;
    My select statement:
    select GET_ADDRESS(1205) Street, DI.n_inactive_flag, DI.n_onhold_flag
    from tbl_dealer_info DI
    where DI.n_dealer_id = 1205;
    I would like to be able to select the street, city, state, and zip all in this select statement from the GET_ADDRESS function.
    Thanks,
    Lori Neirynck

    "The reality is you've probably already put your blinders on and you won't learn the best approach to solving your problem because you insist on asking a courtroom style question (just "yes" or "no" please)."
    Actually, I asked this question because I was looking for the best approach to my problem. I have an SQL statement that correctly selects everything it needs to from all 15 tables. The thing of it is it is very long and difficult to read. I wanted to try using functions so that I could change 12 AND/OR statements into 3 IF statements so everything is easier to read. I have received a couple of different ways to do this from other forums that assumed I knew what I was doing. I have gotten one to work, the other I'm still working on. I'll post the one that worked for others that want to know.
    SQL> insert into dealer_info values (1,'Me','13 success street', 'Wonder Town','Wonderland','1313');
    SQL> commit;
    SQL> create type t_address as object (
    2 street varchar2(100),
    3 city varchar2(30),
    4 state varchar2(30),
    5 zip varchar2(10));
    6 /
    Type created.
    SQL> create or replace function get_address (p_id number) return t_address
    2 is
    3 ret t_address := t_address(null,null,null,null);
    4 rec dealer_info%rowtype;
    5 begin
    6 select * into rec from dealer_info where id=p_id;
    7 ret.street := rec.street;
    8 ret.city := rec.city;
    9 ret.state := rec.state;
    10 ret.zip := rec.zip;
    11 return ret;
    12 end;
    13 /
    Function created.
    SQL> col name format a10
    SQL> col address format a70
    SQL> select name, get_address(id) address from dealer_info;
    NAME ADDRESS(STREET, CITY, STATE, ZIP)
    Me T_ADDRESS('13 success street', 'Wonder Town', 'Wonderland', '1313')
    1 row selected.
    -Lori

Maybe you are looking for

  • Using boston acoustics digital ba735 speakers on my Mac Pro

    just bought a Mac Pro. Would like to use my digital ba735 speakers from my old Gateway. These are proprietary and needed a digital sound card. Any way I can use some type of converter cord to accept the line out audio signal. mac pro   Mac OS X (10.4

  • In two page view preview shows the first page on its own

    In two page view preview shows the first page on its own. I have recently downloaded an ebook which has image based tutorials and the pages are in such a way that pages 3 and 4 should be seen next to each other. Preview seems to want to have pages 1

  • Please: HELP with iMIX. Urgent !

    Dear all I tried to find an apple.com eMail to ask this help without be successful. Please I hope you can help me. Well: I did an iMix including 7 songs on the list. I followed exactly all the iTune instructions. BUT when I published this list, it re

  • How to Map the parameters in GP interface?

    Hello All , I have 2 callable objects in two different actions for same Block. How to map the first callable object output to input of second callable object ?? Please give the clear details. Thanks Risha

  • Numbers on keyboard don't function correctly after installing Win 8 Pro

    After upgrading my HP Pavillion dm3 Notebook from Windows 7 to Windows 8 Pro the numbers and special characters above them do not work; just get odd letters, for example if I type the number "2" I get and "i", etc.  I can't even enter my e-mail addre