Querying data from External Source from FORMS

I have a form that is built based on Oracle tables.
But I need to get data from external Data source from within Forms and use it fro validation.
I need to execute a Select statement via ODBC from within Forms procedures. This is going to a SQL Server DB to get some information.
Any thoughts?
Thanks

Hi
What version of forms do you use? If you use forms 6i, take a look at the EXEC_SQL package. You can access oracle databases and ODBC databases (using OCA) independently of the main database connection -- well, I never tried but that is what the documentation says.
I am not sure about version 9i... the package is there, but I could not find anything in the help about it (what is not a good sign...)
hth
Luis Cabral

Similar Messages

  • Not able insert ,query data from forms

    hi,
    I am not able to insert data or query data from forms(10g devsuite).getting error frm-40505,frm 40508 .i am able to insert and select record from sql plus.the block ihave created is control block .it is connected to the table using the properties.
    should i do anything to insert record.please help

    the block ihave created is control block .it is connected to the table using the properties.A Control Block, by definition, is a non-database block. This means the block is not directly connected to a table so you have to manually display data in the block and any DML you want to perform on data in this block you must do manually as well.
    There are four database objects you can base your database block on; 1) a Table, 2) a View, 3) From Clause Query (basically an In-line View), and 4) a database stored procedure. I recommend you use one of these four methods rather than manually display your data.
    Craig...

  • Querying Data from 3rd Party System

    We would like to query data from a 3rd party (non-SAP) system.  Our BW is an MSSQL DB and the 3rd party is also an MSSQL DB.  We do not want to physically load the data from the external system we just want to use the BW query tools to display the data.
    Is this possible?  I thought this is what a Remote Cube would be used for but SAP's instructions on Remote Cubes are vague and confusing.
           1.      In BW, create a source system for the external system that you want to use.
           2.      Define the required InfoObjects.
           3.      Load the master data:
    ·        Create a master data InfoSource for each characteristic
    ·        Load texts and attributes
           4.      Define the RemoteCube
           5.      Define the queries based on the RemoteCube

    Hi Jon,
    SAP RemoteCube is an InfoProvider. This is a special RemoteCube that allows
    you to define queries with direct access to transaction data in other SAP systems. SAP RemoteCubes are defined on the basis of an InfoSource with flexible updating, and assume the characteristics and key figures of the InfoSource.
    Use/Data Flow
    Unlike with other RemoteCubes, it is not necessary to program extractors. The
    same extractors are used to select data in the source system that are also used when replicating data into the BW. When executing a query, each navigation step sends a request to the extractors for the assigned source systems. In addition, characteristics selection and selection criteria for these characteristics are transformed to fields in the transfer structure, in accordance with the transfer rules. They are transferred to the  extractor in this form. The delivered datasets run through the transfer rules in BW and are filtered once again in the query.
    In your case Remote cube can be an option .
    Cheers
    Raja

  • How to save data from form into database

    i nid to save data from form into the new table, @abc.
    got any idea ?
    smtg like oObj = BaseAddOn.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes) this but it is a new object or user data source.
    Thanks

    hi
    i have created UDO i have also done registration  i want to bind item master completely to matrix and then in one column i will set check box to check unchecked and then i want to save it to database
    i have one user defined form and 4 matrix and 4 child tables
    for each matrix i have given 1 form and i have to transfer the data from temp form to main form matrix having large data in matrix on temp form to main form matrix
    to load data on matrix i have used for loop that i want to avoid so how i can bind large data to matrix without for loop
    regards
    amey

  • Use evdre to query data from a SQL View

    Hi all
    I believe that it is possible to use evdre to query data from a SQL View. If this is possible then how does one go about setting it up in the evdre options (assuming that the view has already been created)?
    Regards,
    Byron

    Byron,  perhaps this is no longer supported, it might be worth opening up a case at service.sap.com on this.  However, I did find the following on Page 11 of the "Usages and Considerations of EVDRE" pdf file.  This doc is imbedded in the helpfile for BPC 7 SP5 (which was released in August of 2009, well after note 1315011 was last updated.
    It looks like you are limited to one custom view per application, since you have to name the view in a parameter at the APPLICATION level.  Go into BPC Administration, login to the application related to the custom view, choose "Set Application Parameters" and enter the name of the view to the Application Parameter called "EVDRE_QUERYVIEWNAME"  If it is not listed, go ahead and create it at the bottom of the Application parameter screen.
    Also:  I interpreted the following info from Page 10 of the same doc:
    In your EVDRE, set the following options:
    QueryEngine: MANUAL
    QueryType:  enter either NEXJ  OR TUPLE  see below:
    NEXJ  - Use two-dimensional queries using the nonemptycrossjoin function
    TUPLE  - Use two-dimensional queries using tuples"
    And I'm assuming you'd enter a Y for the following two parameters:
    QueryViewName
    "..to enforce the query engine to use a used-defined SQL view of the fact tables, when trying to read the values using SQL queries. This option is typically used in conjunction with the SQLOnly option (see below). "
    Option SQLOnly
    "..to enforce the query engine to only execute SQL queries, when reading data. This can be achieved using this option."

  • Query data from MS SQL db through Oracle ? By using JAVA ?

    Hi folks,
    I would like to sync our one table in oracle db with table in different system, stored in MS SQL database.
    What would be the easiest option for connection from Oracle to MS SQL db to be able to query data from MS SQL through some Oracle package?
    If possible, I would like to keep all "tricky steps" within Oracle database. I heard about option with Java, but so far we have no experience with java in Oracle.
    Our database: Oracle 11g Database Standard Edition One
    Many thanks,
    Tomas

    C:\Users\tomeo>dg4pwd HELIOS
    ORACLE Gateway Password Utility
    Constructing password file for Gateway SID HELIOS
    For user account SYSTEM
    OPW-00001: Unable to open password-file (RC=0)
    C:\Users\tomeo>

  • Trying to query data from a view - ORA-01882 and ORA-02063 Errors

    Hey there,
    I tried to query data from a view that was provided by a colleague. This view works fine and gives correct data using PL/SQL Developer or SQLPLUS, but in SQL Developer, I get the following error:
    ORA-01882: Time zone region not found
    ORA-02063: preceding line from SYSTOOLS
    01882.00000 - "timezone region %s not found"
    * Cause: Specified reason name was not found
    * Action: Please contact Oracle Customer Support
    Vendor Code 1882
    Where comes this error message from?! SYSTOOLS is the database link.
    Can't see an obvious reason for this error.
    OS is Windows 2000 SP4, SQL Developer is v1.1.1.25 BUILD MAIN-25.14
    Regards,
    Thomas

    From Oracle Messages 'Cause and Action'
    http://www.oracle.com/technology/products/designer/supporting_doc/des9i_90210/cmnhlp72/messages/ora_messages.htm
    ORA-01882, 00000, "timezone region %s not found"
    Cause: The specified region name was not found.
    Action: Please contact Oracle Customer Support.
    Maybe invalid region in NLS_LANG?
    "select * from v$nls_parameters"
    Starting this script in all developer program and compared result...

  • Best Practice on querying Data from Database

    Hello and I was wondering what is the preferred and best practice for querying data from an SQL database inside a JSP page. Is it using the JSTL library or another method? Thanks

    It depends on the size of the application really.
    The "correct and preferred" approach in a large MVC app would be to have a seperate class that does all the database access, retrieving the data into java objects.
    Check out [url http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html] DAO pattern
    You then "save" the data into request/session attributes, and forward to a jsp page to render the result.
    Most approaches recommend a separation between JSP (the view) and SQL code.
    The JSTL sql tags are provided more for "quick and dirty" code applicable in small applications, or for fast prototyping. That approach is not really robust for large scale applications.
    Cheers,
    evnafets

  • Export data from forms to excel

    HI
    In my application im trying to export data from forms to excel.Everything works fine.First of all im using get_file_name for selecttion of file and passing it to ole2 package as follows
    FILENAME := GET_FILE_NAME(File_Filter=> 'XLS Files (*.xls)|*.xls|',dialog_type=>SAVE_FILE);
         ARGS:=OLE2.CREATE_ARGLIST;
         oLE2.ADD_ARG(ARGS,Filename);
         OLE2.INVOKE(WORKSHEET,'SAVEAS',ARGS);
    The problem is if i select an existing file the get_file_name itself raises one message ".....file already exists Replace an existing file?"
    Similarly the excel also also raises the same message "".....file already exists Replace an existing file?".I want to suppress atleast one of them? Could anyone help for this problem?
    appreciate ur help
    THANKS

    Looks like...
    ole2.set_property( ex_app, 'DisplayAlerts', false );
    where "ex_app" variable Excel Application -
         ex_app:=     ole2.create_obj('Excel.Application');
    and more Question:
    When i close excel app - in process viewer i see "excel.exe"
    ole2.release_obj don't work :(

  • Exporting Data from Forms to Excel

    Hi,
    How can I export the data from Forms to Excel like which Export function in the Oracle Applications.
    Thank you,
    Voon

    Hello,
    By using dde package you can export the data from Form to Excel. Here is the sample code which i have used. you can write this code in the when_button_pressed trigger.
    declare
    appl_name varchar2(255);
    channel_id pls_integer;
    application_id pls_integer;
    x number;
    y number;
    V_TIME VARCHAR2(30);
    begin
    if :global.application_id is not null then
    message('Application already open');
    else
    appl_name := 'c:\program files\microsoft office\office\excel.exe';
    :global.application_id := dde.app_begin(appl_name,dde.app_mode_normal);
    end if;
    if :global.channel_id is not null then
    message('Communication channel already established.');
    elsif :global.application_id is null then
    message('Application must be launched first.');
    else
    :global.channel_id := dde.initiate('excel','book1');
    end if;
    DDE.POKE(:global.channel_id,'R1C1','Col1 Heading',DDE.CF_TEXT,1000);
    DDE.POKE(:global.channel_id,'R1C2','Col2 Heading',DDE.CF_TEXT,1000);
    DDE.POKE(:global.channel_id,'R1C3','Col3 Heading',DDE.CF_TEXT,1000);
    FIRST_RECORD;
    X := No of Records;
    for y in 2..x
    loop
    launch_excel is a program unit--
    launch_excel(y,:global.channel_id,:block.item1,:block.item2,::block.item3);
    next_record;
    end loop;
    FIRST_RECORD;
    EXCEPTION
    WHEN DDE.DDE_APP_FAILURE THEN
    MESSAGE('Could not launch application for DDE operations.');
    RAISE FORM_TRIGGER_FAILURE;
    WHEN DDE.DDE_INIT_FAILED THEN
    MESSAGE('Could not initialize DDE communication channel.');
    RAISE FORM_TRIGGER_FAILURE;
    WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
    MESSAGE('Could not establish DDE communication channel.');
    RAISE FORM_TRIGGER_FAILURE;
    WHEN OTHERS THEN
    MESSAGE('Error: '| |TO_CHAR(SQLCODE)| |' '| |SQLERRM);
    RAISE FORM_TRIGGER_FAILURE;
    END;
    LAUNCH_EXCEL
    PROCEDURE LAUNCH_EXCEL(
    y in number,
    channel_id pls_integer,
    param1 varchar2,
    param2 VARCHAR2,
    param3 varchar2) IS
    v_rowno varchar2(20) := 'R'| |y;
    BEGIN
    dde.poke(channel_id,v_rowno| |'C1',col1,dde.cf_text,2000);
    dde.poke(channel_id,v_rowno| |'C2',col2,dde.cf_text,2000);
    dde.poke(channel_id,v_rowno| |'C3',col3,dde.cf_text,2000);
    EXCEPTION
    when others then
    message('Error --'| |sqlcode| |sqlerrm);
    message('Error --'| |sqlcode| |sqlerrm);
    raise form_trigger_failure;
    END;
    null

  • How to query data from Oracle, MySQL, and MSSQL?

    For an environment consisting of Oracle 11g/12c enterprise edition, MySQL 5.7 community edition, and MSSQL 2008/2012 stanard/enterprise edition, is there any major issue using DG4ODBC to query data from all 3 platforms?
    Is there other free alternatives?
    If the queried data is mostly contained in MySQL or MSSQL, will it be more efficient to query from MySQL or MSSQL?
    If yes, any suggestion of how to do it in those platforms? I know MSSQL can use linked server but it is quite slow.

    mkirtley-Oracle wrote:
    Hi Ed,
        It is semantics.  By multiple instances I mean you have the gateway installed in an ORACLE_HOME which has 1 listener. However, if you are connecting to different non-Oracle databases or different individual databases of that non-Oracle database then you need multiple gateway instances for each database being connected.  I did not mean that you need a gateway installed in a separate ORACLE_HOME for each non-Oracle database to which you are connecting.
    Each of these would have a separate instance file within that ORACLE_HOME/hs/admin directory with the connection details for the non-Oracle database to which that instance connects.. So, you would have -
    initgtw1.ora - connects to MySQL
    initgtw2.ora - connect to SQL*Server northwind database
    initgtw3.ora - connect to SQL*Server test database
    etc
    etc
    Each of these instances would have a separate entry in the gateway listener.ora.
    In MOS have a look at this note -
    How To Add A New Database or Destination To An Existing Gateway Configuration (Doc ID 1304573.1)
    Regards,
    Mike
    Ah yes, we are in agreement, it was just semantics.  Thanks.

  • Shifting of data from forms to word (arabic)

    In one of our ongoing project we need to pass some data from forms to
    word document , in some cases the Shifting of data takes Place mostprobably when we used / character . The Format of data in Arabic and English .
    example:-
    T C 3/5
    get shifted into T C 5/3
    character . the data in arabic and english.
    Any conclusion.
    Regards

    hi
    do u have any Idea abou calling a Function Module (F.M)..
    1.The form interface in the smart form do the same as Functionmodule interface..
    2.when u r running the Smartfrom means u need to send some data to the smartforms and u will get some return parameters... this form interfaces do the same...i) Import tab in form interface is used give some inputs to the form
              ii) Export tab in form interface is used return some inf Form Smartform to Calling Program.
            iii) the Table tab is used to send the Internal table data.
    3.retriving data form Database table... u can achive this in two ways..
          i) selectin data in drivere program or calling program and send that to Smart forms.
      ii) selecting the data in the smartforms... you can write the code in GLOBAL DIFINATIONS-->INITIALIZATIONS tab.. Note:!!! when u want to use intenal tables or variables in initialization tab.. u have to pass them in INPUT AND OUTPUT PARAMETERS of the INITIALIZATION tab.
    Please Close this thread.. when u r problem is solved
    Reward if Helpful
    Regards
    Naresh Reddy K

  • Carrying data from form to form

    Hi
    I have a problem with carrying data from form to form.
    Once a user logs in I want their name to appear on each screen of the application.
    I tried storing the name from the textfield using : textField.getString();
    But I keep getting an empty string as its picking up the blank textfield,
    How do I save the name that the user enters and be able to carry it on to all the other forms?
    Thank you for your help,
    Kind Regards

    According to my knowledge
    You have two options for storing login information.
    One way is to store Login info in the record store. but i think it is not a good one, as your session expires you should not require the login cache. so you should delete that data for better operations.
    Second option is to create a class which can act as a cache memory for your program.
    Follow these steps for this options.
    1. Create a cache class with all the public variables which you want to access.
    2. Create an object from main midlet of this class.
    3. Pass this object in each form with navigation.
    4. So every variable can be accessible from all the forms as object of this class is instantiated only once.
    Thank You.

  • Query Data From Table Synonym

    Hi Experts,
    I encountered an issue when querying data from a table synonym. Some newly created data can be found in the physical table, but not seen from its synonym created in another schema. What could cause this?
    Thanks for your help.

    The synonym is defined as:
    CREATE OR REPLACE SYNONYM "APPS"."synm_table1" FOR "CN"."table1";
    When I query from APPS schema:
    select * from synm_table1 where last_update_date>'16-jul-10'
    I get nothing.
    When I query:
    select * from CN.table1 where last_update_date>'16-jul-10'
    I get the expected rows.What are the results of
    select owner,object_name,object_type from dba_objects where object_name='SYNM_TABLE1';

  • Query Data from other Oracle Database into current

    Hi all,
    I have to query data from another oracle database into the current oracle database. Because the customer has standard edition, I cannot use a pipe. I tried "SELECT column_name FROM external_oracle_db.schema.table WHERE column_name = 'column_value';" Unfortunately this does not work.
    Does anyone have a suggestion?
    Thanks
    Hans

    Have you tried with Database links?
    SELECT column_name FROM schema.table@external_oracle_db WHERE column_name = 'column_value';
    Satish

  • Loading data from forms 6i to excel

    I am trying to load data from forms 6i to excel. Everything is working, except excel spreadsheet do not release from memory.
    The ole2.release_obj(cell); ... and so on does release obj but does not release excel.exe from memory. So if you will go to a task manager you will be able to see as many excel.exe processes as you loaded data. Can anybody let me know what to do?
    Thanks
    null

    Maybe this will help.
    http://www.orafaq.com/forum/t/32129/0/

Maybe you are looking for

  • How to show alv report in tree structure

    hi all, how to show data or create a alv report in tree structure. thanks in advance. Harsha

  • How do I sync my existing iPhone to a different Mac?

    I have an iPhone 3G loaded w/ apps, playlists, etc. that is currently synced to my work Macbook. My Macbook has a LOT of apps, many which aren't on my iPhone, only synced as needed. I want to keep the apps and sync it with my Mac Mini at home. I am w

  • Read the content of a file attached to a document

    Hi, I have a requirement to read the content of the file attached to the document and send in the body of the email. The original get stored in the KPRO server. Can anyone suggest how can i read the content of the file stored in the KPRO server. HTTp

  • CUCM Reporting web application Report viewer

    HI I downloaded reports (XML format) from CUCM reporting by generating new reports which are in xml format. How can i view these reports in HTML or PDF format?? Sample file attached. any help is highly appreciated. Shyam 

  • SMS from ABAP program to send error message

    Hi, I would like to know what are settings to be done in the system to send an SMS from ABAP program using FM 'SO_DOCUMENT_SEND_API1'.I was trying to send SMS using above FM but the error was "Cannot process message, no route from <userid> to <Mobile