Browsing and selecting through database link to fill in a form item

Hi
I have created a database link named in my application
dblink_3
I have a form and report in my application. On the from I have an item called P6_USER_ for which I would like to access a table (trk_user) through the database link I created so that I can fill in the text field or select list with a user from the table.
can I browse by a select list somehow? or do I need to create a button that takes me to a report with a list of the data in the table and select that way.
Please steer me in the right direction,
Thanks,
Kirk

Hi Kirk,
The fact that the data is on an external table shouldn't make any difference. You can do:
SELECT field1 d, field2 r FROM trk_user@dblink_3 ORDER BY 1
and that will give you your select list

Similar Messages

  • How to access the LOB objects through database links??????????????

    How to access the LOB objects through database links??????????????

    Hi
    See:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:52297289480186
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5322964030684
    And you also might want to get a new keyboard, your '?' seems to be stucked....

  • Write data from Oracle 9i 64 bit to Oracle 32 bit through database link

    Hi to All:
    We are using following Oracle 64 bit application.
    Operating System: Sun Solaris 5.9
    Database: Oracle 9i (64 bit)
    Machine: Sun Server Spark V890
    Now my questin is that I want to move data from the production database running in Oracle 9i 64bit on Sun server to Oracle 9i 32 bit on Windows Server 2002 thru database link.
    I heard that it is not possible to write data from oracle 64 bit to oracle 32 bit, no matter what operating system we are using.
    Please confirm me that whether we can write data through database link from Oracle 9i 64 bit to Oracle 32 bit.
    Please specify every possible solution or any site from where I can have the solution.
    Thanks in advance.
    Hassan Raza Khan Lodhi

    Create a test table ( in 64bits db) , add some data
    From 32bits create a dblink
    Execute the following query
    create table test_32
    as select * from test64@dblinkto64;
    Michael

  • What is the method for folder-browsing and selecting a non media file type in Android? [Air+AS3]

    Dear Gurus,
    Being a newbie, I have been searching hi & low for the method to browse and select non-media related file type in android.
    Besides the following these which I have reference from the AS3 Documentation (http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7fe4.html#WS5b3cc c516d4fbf351e63e3d118676a4c56-7ff0)
    var fileToOpen = File.documentsDirectory.resolvePath("");
                                  selectFile(fileToOpen);
                                  function selectFile(root:File):void
                                                 //var txtFilter:FileFilter = new FileFilter ("3D Model File", "*.obj; *.3ds;*.awd");
                                                 root.browseForOpen("Open",null);
                                                 root.addEventListener(Event.SELECT, selectedFile);
                                  function selectedFile(e:Event):void
                                                 trace(fileToOpen.nativePath + " file selected");
    I have went through the following threads yet find no clear workable solution to it.  The closest reference is written in Flex MXML, and I have no luck for converting it to AS3 as there are several properties which I can't get it right.
    http://forums.adobe.com/thread/943887 | http://forums.adobe.com/message/4107990#4107990 | http://forums.adobe.com/message/4548154
    Someone did mention some possible solutions through ANE but it is just too far beyond.  Even, the closest on-the-shelf solution of ANE by http://myappsnippet.com/file-browser-air-extension/ only work best to an extent and not truely "native" as the UI is not default from Android.  It has workable I/O but poor usability; you can't skin it.
    Is there any other workaround solution to this general I/O question?  I would love to hear from everyone here.

    The short answer to my knowledge is there is nothing you can invoke from AIR to open an OS-level dialog to browse/select a file. All implementations typically are people writing their own browser. They crawl the folders/files recursively and write their own display for the files. You can see a few on SO:
    http://stackoverflow.com/questions/12255418/as3-air-browse-for-file-on-sd-card
    http://stackoverflow.com/questions/12257626/as3-get-zip-file-on-phone-from-app-file-path-t hen-unzip
    It's not to terribly hard to code something like this (especially with that starter code). Otherwise, like you found, an on-the-shelf ANE is the only way I believe you can invoke the Android Intent for a file dialog. At that point skinning won't really be terribly easy given the nature of Android users who are completely allowed to customize their UI top to bottom.
    The safest bet is just let that posted code recurse and find the files you tell it to while displaying the list to the user. You can use some pre-written GPU-level lists that you can skin yourself using FeathersUI:
    http://www.feathersui.com (uses Starling)
    Or you can use one of the Flash Pro List components which will be quite a bit slower being they're not GPU optimized like some Flex Spark components.

  • How to select for insert a long column through database link?

    How may a long column (for example a sql server 2000 text column) be selected for insert into a clob column in table in 10g over a database link without invoking ora-00997?
    I've tried using dbms_metadata_util.long2clob without success over a database link.

    Is the remote database an Oracle database? Or are you selecting data from SQL Server 2000 over a database link via Heterogeneous Services? What is the data type of the column in the remote database (LONG? TEXT? Something else?)?
    Justin

  • Spatial Indexes Through Database Links

    Has anyone tried to "use" a Spatial Index through a Database Link? Meaning you try take advantage of the spatial index on column TABLE_A.GEOM through a database link? An example is:
    SELECT rownum, SHAPE FROM GDT_WATER_POLYGON WHERE AND SDO_FILTER( GDT_WATER_POLYGON.SHAPE SDO_CS.VIEWPORT_TRANSFORM(MDSYS.SDO_GEOMETRY(2003, 0, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3), MDSYS.SDO_ORDINATE_ARRAY(-105.06685,39.7744332,-104.981869,39.8338768) ), 8265),'querytype=window') = 'TRUE'
    where GDT_WATER_POLYGON is a public synonym to WATER_POLYGON@DBLINK
    When I try this in the linked table, it works fine, but when I try it using the link, I get the following error:
    ORA-13226: interface not supported without a spatial index
    Am I forgetting to grant something or is it just not possible?
    Thanks!

    Hi,
    Currently, using a spatial index through a database link is not possible.
    Dan

  • How can you SELECT via Database Link CLOB data using Application Express?

    Customer Issue:
    Developer using Oracle's Application Express 3.1. The Developer is trying to SELECT a CLOB datatype column from a remote (10.2.0.3) database, via a database link on her 10.2.0.4 based client Application. The Developer wants to be able to select CLOB data from the remote database which has limitation that she can't make any changes to the remote database.
    Developer's Comments:
    I do a select and get the error. Getting error ORA-22992: cannot use LOB locators selected from remote tables. So she feels she can't use dbms_lob.substr in this configuration I can do a "select into" but that is for one value. I am trying to run a select statement for a report that brings back more than one row. I do not have permission to change anything on the remote database. I want to access the remote database and multiple tables.
    This is not something I work with, would greatly appreciate help or ideas. Is this a limitation of the 3.1; or does she just not have this set up correctly; or should she be using a Collection (if yes, please share example)
    Thanks very much,
    Pam
    Edited by: pmoutrie on Jun 4, 2009 12:01 PM
    Hello???
    Would really appreciate an answer.
    Thanks,
    Pam

    This may not be a perfect solution for you but it worked for my situation.
    I wanted to grab some data from Grid Control's MGMT$JOB_STEP_HISTORY table but I couldnt' create an Interactive Report due to the existance of a CLOB column. I cheated this by creating a view on the GC DB, grabbing the first 4000 characters and turning it into a varchar2 column:
    create view test_job_step_history as
    select job_Name, target_name, status, start_time, end_time, to_char(substr(output,1,4000)) output
    from MGMT$JOB_STEP_HISTORY where trunc(end_time) > trunc(sysdate)-90
    In an APEX Interactive Report:
    select * from test_job_step_history@GCDB
    Granted, the output looks aweful right now but I am only looking for a very particular output (failed, denied, ORA-, RMAN-, etc) so the formatting isn't the most important thing to me right now.
    If anyone can improve -- and I'm sure you can -- on this I'd love to hear about it.
    Thanks,
    Rich

  • OWB-Location for Sybase is defined through database link but not working.

    Hi,
    HS details are configured and database link from oracle to sybase database is working fine. In OWB, table list of sybase database is also displayed. Location defined for sybase database through connector which refers to database link created from oracle to sybase. While defining location on clicking of "Test" it gives result as successful. But when validation program is run for that location, it gives error that validation failed, specify correct host name, port number etc.. now, i am not able to solve this as database link is working fine and it is displaying list of table from sybase database. All the heterogeneous settings are done. I tried but sybase database doesn't allow direct connectivity so i define the location using connector which points to database link. Is there any thing missing in the setting of HS and do sybase allow connectivity direct from owb ?
    Please help.
    (If problem is not clear, please spare time to ask a question, i will reply immediately.)
    With Regards,
    Amit Shah.

    Amit - did you get anywhere on this?

  • OWA_UTIL and HTP across database link

    Has anyone figured out how to use the features of OWA_UTIL, such as listprint, across a database link? I can create a drop list on data that is in the portal instance. But if I try to create a list based on a table in a back-end database through a database link, it generates errors.
    Also, I create a procedure to generate a dynamic page portlet using htp calls and it works fine if the procedure is located in the portal instance. But move the code to the back-end database and access via a synonym and database link and it generates errors out of the owa_util package.

    Create a view on your local db using tables over the db link and base your list on that view.

  • Calling remote procedure through database link

    Hi,
    I have a procedure in a package with a type I delcared as follows:
    Database1 :
    create or replace package p1
    is
    TYPE dependents_rec IS RECORD (
    name VARCHAR2 (80),
    dob date);
    TYPE dependents IS TABLE OF dependents_rec
    INDEX BY BINARY_INTEGER;
    procedure proc1 (p_id in number,
    p_dependents out dependents );
    end;
    On another database database2 i want to call the above procedure from within a procedure in a package that works as a wrapper package with similar structure.
    I recieve the error "Wrong number or types of parameters" error because type dependents is not the same as within the package in database 1.
    How can I call the procedure p1.proc1 over a database link ?
    Thank you

    Hi,
    On database1:
    CREATE OR REPLACE PACKAGE types_pkg is
    TYPE dependents_rec IS RECORD (
    NAME VARCHAR2 (80),
    sex NUMBER (1),
    birth_date DATE,
    birth_place NUMBER (3),
    status NUMBER (1),
    unique_id VARCHAR2 (15)
    TYPE dependents IS TABLE OF dependents_rec
    INDEX BY BINARY_INTEGER;
    end;
    CREATE OR REPLACE PACKAGE wrapper_pkg_demo
    AS
    PROCEDURE read_person_no (
    p_person_id NUMBER,
    p_dependent_info OUT types_pkg.dependents
    END;
    CREATE OR REPLACE PACKAGE BODY wrapper_pkg_demo
    AS
    PROCEDURE read_person_no (
    p_person_id NUMBER,
    p_dependent_info OUT types_pkg.dependents
    IS
    BEGIN
    person_pkg.read_person_no (p_person_id, p_dependent_info);
    END;
    END;
    On database 2:
    CREATE OR REPLACE PACKAGE person_pkg
    AS
    PROCEDURE read_person_no (
    p_person_id NUMBER,
    p_dependent_info OUT types_pkg.dependents@database1
    END;
    CREATE OR REPLACE PACKAGE body person_pkg
    AS
    PROCEDURE read_person_no (
    p_person_id NUMBER,
    p_dependent_info OUT types_pkg..dependents@database1
    IS
    BEGIN
    null;
    END;
    END;
    When compiling the package body on database 1
    ORA-04052: error occurred when looking up remote object TYPES@MOI
    ORA-00604: error occurred at recursive SQL level 1
    ORA-02019: connection description for remote database not found
    Noting that the database link are working properly and when compiling the package on database 2, it compile successfully
    Thank you

  • Procedure containg select from Database link

    Hi,
    I have one database link xxx which is getting some data from one table from Sqlserver database.
    Now I am writing one procedure which contain
    if(c=1) --get from databaselink
    select name,num from table1@xxx;
    else --get from the Oracle table;
    Now iam calling that procedure from .net application which is giving the following error :ORA-01002: fetch out of sequence
    ORA-02063: preceding line from FSPDEV_TO_AVERY_ORGRPT
    it is giving the above error if c=1 otherwise the else part is working fine.
    What i need to do?
    Thanks

    Hi,
    Thanks for your response.
    my procedure is like this:
    Cur_Out sysrefcursor
    if(c=1) --get from databaselink
    Open Cur_out for
    select name,num from table1@xxx;
    else --get from the Oracle table;
    Open Cur_out for Select from Oracle table;
    I will try to execute the procedure from SQLPLUS.
    thanks

  • Oracle and SQL Server Database Link errors

    I am having following error messages while setting up the ODBC connection. I want to access SQL Server tables from within Oracle8i. I have followed all the instruction of Oracle Generic Connectity document and have tested ODBC connection with ODBCPING as well as with TNSPING. Have created Database Link also within Oracle for SQL Server. But when I access the SQL Server table from within Oracle I get the following error messages.
    ORA-12500: TNS:listener failed to start a dedicated server process
    Could any body suggestion the solution please.
    Thanks and regards,
    Ghulam Mallah

    There is a Heterogenous Services/ Generic Connectivity forum that is probably going to have a lot more people familiar with these issues than you'll find in this forum. I would suggest posting over there.
    Justin

  • URGENT !! Capture the insert and select on database

    Hi,
    I need to capture the inserts and selects on the database.
    What are the options available on 9i?
    Thanks in advance!

    I don;t know how many times I've had to say this, but since I've had to say it to my boss, it bears repeating here:
    The SPFILE makes absolutely zero, null, nought difference to whether or not something is changeable dynamically or not. Not one bit, one whit or one iota.
    Parameters are as static or as dynamic as they were when init.oras rules the roost. Check in V$PARAMETER: if the thing says ISSYSMODIFIABLE is TRUE, then the parameter can be altered with an alter system command -and that's true whether you're using an init.ora or an spfile. If it says ISSYSMODIFIABLE=FALSE, then the parameter CANNOT be altered with an alter system command, and that's true whether you're using an init.ora or an spfile.
    Now comes the subtlety: if you add SCOPE=SPFILE to your alter system command then you aren't actually altering the system at all. All you're doing is asking the instance to edit the spfile. So an alter system set db_block_size=67238 scope=spfile will work, because you're not actually asking to alter the current block size at all. You're merely asking the instance to do what you would otherwise have done with notepad or gedit to a traditional init.ora.
    Only if you SCOPE=MEMORY is your alter system command actually trying to change the currently running instance.
    Of course, the trouble starts when you miss off a SCOPE clause, because then you get SCOPE=BOTH, which means MEMORY+SPFILE. But try that on a parameter which is SYSMODIFIABLE=FALSE: it won't work, because the MEMORY bit trips over the fact that the parameter is not system (dynamically) modifiable. Which just goes to prove that the existence of an SPFILE changes ABSOLUTELY NOTHING about whether a parameter can be dynamically modified or not.
    So no, the sentence "my database is using spfile and I have option to use alter system command" makes zero sense if, by it, you mean "I'm using an spfile so can I change things dynamically which I wouldn't be allowed to if I was stuck using a boring old init.ora"
    The answer is always and forever, "NO"!
    I blame a certain bouffant-haired so-called expert for first promulgating this myth that all parameters suddenly became dynamic in the presence of an spfile. It was never true when he wrote it. It isn't true now. It never will be true. It just happens to be the case that "alter system..scope=spfile" is Oracle's equivalent of "vi init.ora" as far as spfiles are concerned.

  • Sort and select in database..

    hi All...
    i write a coding that store data in database, that i have two column rule and weight. after that, i want to display the data with weight sorting ascending and select distinct rule.
    but it's not working. nothings error but it don't do nothing.
    is it wrong with my sql statement?
    public void insertDatabase(Vector rule, double weight){
               try{
                     String sqlInsert = "INSERT INTO Sheet2 ( Rule, Weight ) " +
                          "VALUES ( '"+ rule +"', '" + weight + "' )";
                     int row = myStatement.executeUpdate(sqlInsert);                             myResultSetDisplay = myStatement.executeQuery("Select * from Sheet2");
                     myResultSetSort = myStatement.executeQuery("SELECT * FROM Sheet2 ORDER by Pemberat ASC");
                     myResultSetDistinct = myStatement.executeQuery("SELECT DISTINCT Petua FROM Sheet2");
                catch(SQLException e){
                            System.out.println(e.getMessage());
               }//catch
           }

    how to use admin tool I was talking about the admin tool of the database.
    or debugger?If you're using an IDE, like Eclpise, you can use the built-in debugger to execute the code step by step.
    and i got error that
    [Microsoft][ODBC Microsoft Access Driver]Attribute
    cannot be set nowThe message is clear. It's too late to set the attribute. You already have issued some actions on the connection. Rearrange your logic.

  • Difference between create database link and create shared Database link

    Hi Guys,
    can any one suggest me where to use "create database link" statement and where to use "Create shared database link". I have only idea that using shared database link the process can reuse connections already established to the remote server.
    In my envrionment I am used to connect with db link but sometimes its not working so try with shared link and its working fine. In local as well as remote database we are using DEDICATED only not the shared server.
    so, what the cause behind this?
    Any suggestion?
    Thanks...

    Please refer to documentation:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/ds_concepts.htm#sthref3878
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

Maybe you are looking for