CONNECTING FORM WITH TWO DIFFERENT DATABASES

HELLO ALL
Is there any way I can connect to 2 different databases at the same time. What I have is 2 different database for two different payroll systems. Now what I want to do is if user press a button I send some data from this payroll database to second payroll database using insert and update command.
I am using Form 5, one database is Personal Oracle 7 and second is Oracle 7.3. (I don't think versions matters but anyway)
Thanks
null

Hello,
Yes u can connect to with several database at a time using ODBC connection and Exex_Sql package supplied with Forms6i as a built-in. There is no Exec_Sql built-in supplied with Forms5, but there is a library named exec_sql.pll (Check it out) supplied with Forms5.
using this package u can connect with multiple DB at the same time.
here is an example-
Declare
v_ConnHandle Exec_Sql.ConnType;
v_CursHandle Exec_Sql.CursType;
v_NumRows Pls_Integer;
Begin
v_ConnHandle := Exec_Sql.Open_Connection('Scott', 'Tiger', 'ODBC:DBName');
v_CursHandle := Exec_Sql.Open_Cursor(v_ConnHandle);
Exec_Sql.Parse(v_CursHandle,'Select ename From emp');
Exec_Sql.Define_Column(v_ConnHandle, v_CursHandle, 1, v_EmpNAme);
v_NumRows := Exec_Sql.Execute(v_ConnHandle, v_CursHandle);
While Exec_Sql.Fetch_Rows(v_ConnHandle, v_CursHandle) > 0 Loop
Exec_Sql.Column_Value(v_CursHandle, 1, v_EmpName);
End Loop;
Exec_Sql.Close_Cursor(v_ConnHandle, v_CursHandle);
Exception
When Exec_Sql.Package_Error Then
If Exec_Sql.Is_Open(v_ConnHandle, v_CursHandle) Then
Exec_Sql.Close_Cursor(v_ConnHandle, v_CursHandle);
End If;
Message('Error ('| |Exec_Sql.Last_Error_Code(v_ConnHandle)| |') : '| |Exec_Sql.Last_Error_Mesg(v_ConnHandle));
End;
hope this help you.
best of luck.
null

Similar Messages

  • Connecting to two different database instances from a swing application.

    Hi All,
    I am developing a swing application which needs to interact with two different database instances of two different weblogic servers.
    More eloborately,
    I have some data in DB_Instance1 running on[b] Weblogic_Server1 and I need to insert the same data into DB_instance2 running on Weblogic_server2. Is it possible. Could some explain me how to do that..
    Thanks in advance...
    Sreekanth.

    Hi Rick,
    Try logging onto both Server first. You'll have to use either 2 separate ODBC DSN's or 2 separate OLE DB connections. Set them both for Trusted Authentication, you'll have to configure that on the Server also.Then try your query.
    If that doesn't work then you'll have to create a Stored Procedure or View that can link the 2 Server side.
    Thank you
    Don

  • Can I use two different database with DBSystemLoginModule?

    Finally I can login with Database user id by DBSystemLoginModule on Embedded oc4j server.
    But I confused between [b]jazn-data.xml and system-jazn-data.xml.
    Which xml do I have to edit for jdbcUrl and jdbcDriver?
    Now I would like to use two different database(such as only sid is different).
    In this case I want to show specific database name as realm name.
    What should I do?
    When I use DBSystemLoginModule, I edit JdbcUrl in system-jazn-data.xml.
    So can I pass the parameter for sid programmatically?
    And also I tried to run my application with other database with DBSystemLoginModule on Embedded oc4j server.
    I changed few things(jdbcUrl at system-jazn-data.xml,jazn-data.xml in embedded-oc4j-server/config and database connection for BusinessComponents at Project Properties of Model/ViewController.
    But I got some error.
    Did I miss something?
    ----< my error messgae >------
    500 Internal Server Error
    JBO-30003: The application pool (customer.model.datamodel.CMAppModuleLocal) failed to checkout an application module due to the following exception:oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null     at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)     Message was edited by:
    Message was edited by:
    sdcsdc

    I think I understand now, you are modifing the custom login modules configuration within the system-jazn-data.xml file. This is a bit dangerous! Didn't you register the login module in your orion-application.xml? For example, this is the way I do it:
    <web-module id="customProv-web" path="customProv-web.war" />
    <persistence path="persistence" />
    <!--data-sources path="./data-sources.xml"/-->
    <security-role-mapping name="sr_developer">
    <group name="developers" />
    </security-role-mapping>
    <security-role-mapping name="sr_manager">
    <group name="managers" />
    </security-role-mapping>
    <jazn provider="XML">
    <property name="custom.loginmodule.provider" value="true"/>
    <property name="role.mapping.dynamic" value="true"/>
    <property name="role.compare.ignorecase" value="true"/>
    </jazn>
    <!-- Configuring a Login Module in an Application EAR file. -->
    <jazn-loginconfig>
    <application>
    <name>customProv</name>
    <login-modules>
    <login-module>
    <class>oracle.security.jazn.login.module.db.DBTableOraDataSourceLoginModule</class>
    <control-flag>required</control-flag>
    <options>
    <option>
    <name>data_source_name</name>
    <value>jdbc/OracleDS2</value>
    </option>
    <option>
    <name>roles_fk_column</name>
    <value>userName</value>
    </option>
    <option>
    <name>table</name>
    <value>userinfo</value>
    </option>
    <option>
    <name>groupMembershipTableName</name>
    <value>groupinfo</value>
    </option>
    <option>
    <name>groupMembershipGroupFieldName</name>
    <value>role</value>
    </option>
    <option>
    <name>usernameField</name>
    <value>userName</value>
    </option>
    <option>
    <name>user_pk_column</name>
    <value>username</value>
    </option>
    <option>
    <name>passwordField</name>
    <value>passWord</value>
    </option>
    </options>
    </login-module>
    </login-modules>
    </application>
    </jazn-loginconfig>
    <log>
    <file path="application.log" />
    </log>
    <namespace-access>
    <read-access>
    <namespace-resource root="">
    <security-role-mapping name="<jndi-user-role>">
    <group name="administrators" />
    </security-role-mapping>
    </namespace-resource>
    </read-access>
    <write-access>
    <namespace-resource root="">
    <security-role-mapping name="<jndi-user-role>">
    <group name="administrators" />
    </security-role-mapping>
    </namespace-resource>
    </write-access>
    </namespace-access>
    </orion-application>

  • How to add two different database connections on Model

    Hi,
    In my application, I need to create View Objects on different databases. So I need to add two different database connections on the Model.
    But it seems like Model can be connected to only one database. I tried adding another project to add the second db connection. But after I created a read-only View Object in the second project, it didn't generate corresponding data control in the Data Controls panel.
    Could anyone help me on this?
    Thanks!

    Do you mean adding the second project folder in ViewController->Project Properties->Libraries and Classpath?Yes, either that or: ViewController -> Project Properties -> Dependencies
    And I didn't see the first Model project in the ViewController classpath. Otherwise it wouldn't work. The first model project IS in 'classpath'. Here's how:
    ViewController -> Project Properties -> Dependencies
    I tried this and recreated the View Object. Still didn't generate the datacontrol. No idea why you had to recreate the VO.
    Is your VO in an application module inside the SECOND project?
    After you are sure that everything is in the ViewController's classpath, just try restarting JDeveloper.
    This is very basic. has to work.

  • I am trying to connect oracle develper suit form with oracle 10g database

    i am trying to connect oracle develper suit form with oracle 10g database
    but when i pass username and password
    this message apperars
    ORA-12560:TNS:protocol adapter error
    every time even i try to connect Report or Designer each time same problem
    making no connection .
    can any body help can help me to reslove this prblem
    Arshad khan

    Duplicate thread:
    Re: connection problem

  • HT1476 i plug in my phone to the  charger and i tried with two different cables, and it seems like it is not making connection to the clable?

    i plug in my phone to the  charger and i tried with two different cables, and it seems like it is not making connection to the clable. but it is not charging. what are some possible ways o fix that?

    When you plug in your charger and attach it to the MBP, initially the light will turn green.  If the MBP needs charging, a few seconds later the light will turn amber.  That is normal.  If your symptoms are different, then they may or may not be a problem.
    Ciao.

  • APEX Application accessing data from two different databases

    Hi All,
    Currently as we all know that APEX Application resides in database and is connected to the schema of that database.
    I want APEX Application to be running and accessing data from two different databases. Elaborating my question,
    Currently, my APEX Production Application is connected with XXXX Schema of DB1 Database(Where APEX Resides). Now I want to add some pages into this APEX Application for REPORT Purpose, But I want to connect this REPORT APEX Pages to get data from Different Schema YYYY for Database DB2.
    Is it possible to configure this scenario?
    The reason for doing this is to avoid the REPORT related (adhoc queries) resource utilization effect on Production DB1 Database.
    Thanks
    Nil

    1. If you do the joining of two or more tables in DB1 then all data is pulled over to DB1 and then the join is executed: so more data over the databaselink and more work for DB1. Better keep the joining stuff where the data resides and just pull exactly that data over that you need.
    2. Don't know about your different block sizes. Seems a nice question for one of the other forums (DBA or SQL).
    3. I mean create synonyms on DB1 for reports VIEWS in DB2.
    Hope all is clear!

  • How to use more than one connection pool to 2 different databases ??? (Weblogic 5.1)

    Hello,
    In my application, I must use two different databases to retrieve
    informations...
    My application use EJB so I created two pool of connection named pool1 and
    pool2...
    But when I yet used the pool1 to connect to first database and I try to use
    the pool2 (to connect to the second database), an SQLException occurs :
    "java.sql.SQLException: Connection has already been created in this tx
    context for pool named <first pool's name>. Illegal attempt to create
    connection from another pool: <second pool's name>"
    I have found the answer in www.bea.com
    http://e-docs.bea.com/wls/docs61/faq/JTA.html#738373
    Anybody can help me and give me the more easy,quickly and the more efficient
    way to use two database with two different connection pool..
    Thanks..
    Dephi

    Hi
    You need to configure TxDataSource with XA connection pool.
    More information can be found here:
    http://e-docs.bea.com/wls/docs61/jta/thirdpartytx.html
    Regards,
    Slava Imeshev
    [email protected]
    "Philippe Da Cunha" <pdacunha@@webraska.com> wrote in message
    news:3bfcd6ee$[email protected]..
    Hello,
    In my application, I must use two different databases to retrieve
    informations...
    My application use EJB so I created two pool of connection named pool1 and
    pool2...
    But when I yet used the pool1 to connect to first database and I try touse
    the pool2 (to connect to the second database), an SQLException occurs :
    "java.sql.SQLException: Connection has already been created in this tx
    context for pool named <first pool's name>. Illegal attempt to create
    connection from another pool: <second pool's name>"
    I have found the answer in www.bea.com
    http://e-docs.bea.com/wls/docs61/faq/JTA.html#738373
    Anybody can help me and give me the more easy,quickly and the moreefficient
    way to use two database with two different connection pool..
    Thanks..
    Dephi

  • How to process reports with two different date fields

    Morning all,
    This question is somewhat similar to what I asked few days back. I created two different reports for two different departments (Credit Control and Free of Charge Control).
    These two reports pull data from two different date fields and has different status check ups.
    Few days back my director requested me if he can have both reports in one report. That is when I asked question from all of you regarding two reports.
    Anyhow, that was created by implementing two sub reports however, the director asked me to combine the two different reports into one in such a way that the output records should be added up with each other hence one single report with all combined data of Credit Control and Free of Charges (not two sub reports in one report).
    The problem here which I am getting is that, both reports uses two different date fields. I can live with two different statuses as that can be easily done within formula/RT however how to create a report with Report Selection Formula condition which looks in both date fields and produces results accordingly?
    I have tried this by not putting any condition in report selection formula and ran the report, it produced total results from past 6 years.
    Any ideas how to produce combined report which has two different date fields?
    Many thanks in advance
    Regards
    Jehanzeb
    What I

    Charliy,
    No the both dates are from two different databases, tables and fields. The Credit date field is from KLAB database under max table where as the FOC date field is from SAE database under maxmast table. Klab date is under credit2 table where as foc date is under order header table.
    So its more like this:
    Klab->Max-Credit2--->Credit_date
    Sae->Maxmast->Order_header---Date entered.
    two dates totally different tables, dbs
    however, I will try your idea too and see if that works.
    Regards
    Jehanzeb

  • How do I sync two ipods with two different IDs on the same computer?

    How do I sync two ipods with two different IDs on the same computer?

    Simply connect them.  One computer with one iTunes can manage multiple devices.  They're tracked by S/N but you might wish to assign them unique names so that you can track them yourself.
    The only minor issue is app updating and purchases while on the computer.  It's necessary to log out and back in to the "correct" ID.  Much easier to do these things from the iPods.

  • Smart form with 2 different pages

    Hi Experts
    I have a requirement, I need to develop a smart form with 2 different pages, and each page has different data and presentation of the data also is different.
    In the first page I need to display the contract data with the line items and amounts and in the second page I need to display the partner details with their contact details. From second page onwards it may go further based on the partners exists for that contract.
    Plesae advice me best possible way to achive this.
    Thanks
    Praveen

    Hi Praveen,
    Create two Pages:
    First Page:
    In general Attributes section- Keep page2 as next page
    Create Main window and under that
    Keep the text elements for contract data of line item and amounts as required
    Second Page:
    In general Attributes section- Keep page2 as next page
    create main window and under that
    get all the partner details of line item into an internal table(using program lines node).
    Now use 'Tables' node which behaves as loop for this internal table (so that it continues further if it contains date more than 1 page)
    And display the values in smartform using Text node
    Regards,
    Swarna Munukoti.

  • How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?, How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?

    How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?, How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?

    Hi Libby,
    Select all three columns of data. All three must be 'regular' columns, not Header columns, and the X values must be in the leftmost column.
    Click the Charts button and choose the Scatter chart.
    The resulting chart will initially show only the first and second columns of data, and the selection will have been reduced to show this.
    Click the gear icon at the top left of the selection and choose Share X Values.
    You should see a result similar to this:
    Notes:
    The values on my sample table contain a random element, so they have changed from thhe first image to the second.
    The chart is as created by Numbers, with two edits:
    Data points have been connected with curves, using the Chart nspector.
    The curves were selected and their stroke increased to 2pts, using the stroke formating button in the format bar.
    Regards,
    Barry

  • Split valuation for  material with two different price indicator S and V

    Hello Gurus,
    Is it possible to maintain split valuation for same material with two different price indicator S and V.
    For Ex. Material A is manufactured can be manufactured in house ,  procured from outside vendor and can be purchased from subcontracting vendor by providing raw material.
    We want to keep  Price control V for same material " A"  which is procured from outside vendor.
    And price control S for inhouse produced same material " A".
    Besically this material is semifinished and having BOM for subcontracting.
    Please advice.

    Hi
    When the material is split valuated, you maintain the accounting view for the material 1st with valuation category, here the price control should be V.
    When you will extend the material to valuation type "Inhouse mfgd" maintain the price control as S, for valuation type "Procured form outside vendor" maintain it as V.
    Regards
    Prasad

  • Sales Deal with two different validation dates for the same material

    Hi SAPers,
    I am trying to create a u201CSales Dealu201D VB31, for the same material/condition, but with two different validation dates. After the creation of the first record, I select u201CNew conditionu201D button, but the system give me the message VK104, u201Cthe condition is being processed in the current session.u201D.
    How can I solve this issue?
    Thanks in advance.
    Pedro

    We can't have multiple records for the same condition and key values valid on the same date. The condition end date is part of the primary key in the database table. The date ranges between the records cannot overlap. When you create a new record, usually the end date is set to 12/31/9999 by default. If you need to have this deal to end on a different date and a new deal to start afterwards, then first you need to change 12/31/9999 to a different date.
    Also usually I try to exit the screen between the transactions.

  • Can a real Server be applied in two different server farms associated with two different VIP IP and TCP Port

    Good day everyone,
    I have a question in regard to real server operation with different server farms, and VIPs
    Can a Real Server be associated ( for simpliciy) with two different Server Farms that have a VIP associated with each, servicing the same TCP Port (443).
    Example:
    SF-A
    RSRV-1: 192.168.1.10 /24
    RSRV-2: 192.168.1.11 /24
    VIP-A: 192.168.1.20 /24
    VIP-A: https:web-A
    Protocol: HTTPS
    SF-B
    RSRV-2: 192.168.1.11 /24
    RSRV-3: 192.168.1.12 /24
    VIP-B: 192.168.1.30 /24
    VIP-b: https:web-B
    Protocol: HTTPS
    Client-A: 172.16.128.10
    Client-B: 172.16.128.15
    I have attached an sketch depicting the connectivity.
    As always any feedback/Suggestions will be greatly apprecaited.
    Cheers,
    Raman Azizian

    Raman,
    This type of config is no problem. What the server is doing is virtual web hosting. The server would have two different web services running for the same IP, but each listening for a unique host header.
    From an IP point of view both connections would be destined to the rserver address on port 80, but in the http header they would have two different Host headers.
    one for www.example1.com and the second for www.example2.com. If the web server is configured correct so each host name is tied to one web service it will not have any issues.
    The config you attached looks ok. The way you have the sticky group is ok doing source IP. If you use cookies for the sticky group I would suggest you create two sticky groups each with a different cookie name and add the same serverfarm to both groups. The client will only send a cookie for the domain it received it from so using the same cookie in two vips could cause problems if the same client hits both vips.
    Hope that helps
    Regards
    Jim

Maybe you are looking for

  • Getting PO number as file name when getting output as pdf file

    Hi Experts, Is there any possibility to get PO number into file name (instead of spool number) when getting output as pdf file. Since I'm printing POs in batches (as pdf) it is too difficult to find exact PO among all the pdf files. If PO number main

  • Product Locker corruption Ref No. E61233659

    My product locker is corrupted showing duplicated items and items with black box with sony displayed in the black  with duplicated registered dates.  Some items I can delete but at the bottom of the list it just adds back another duplicated item.  Ot

  • SIRI PRIVATE BROWSING

    Why are siri searches not private when private browsing in safari is enabled ?

  • Changing IIS log file rollover period

    Hi, I have a question that I hope that someone could help me with. I have an Azure Cloud service running a web role. I want to change the IIS access log file rollover from hourly to daily. The way I approach this is to create a Startup task in this w

  • Help  What free trial will eable me to edit a PDF

    I need to edit a PDF what free trial will work.  Tried to download three times and keeps saying 30 days expired.