Calling another database connection within a database connection

Dear All,
I am using an oracle form by connecting with oracle database and or runtime I have connected succesfully with ms sql server database wtih EXEC_SQL package. The syntax is as follows:
open connection with odbc
open cursor
parse ddl statement in the cursor
execute cursor
close cursor
close connection
All the above steps are working except the last one. while closeing the odbc connection it's giving internal errro.
So please show me how to disconnect succesfully through this package.
Thansk & Regards,
Habeeb.
[email protected]

Dear All,
I am using an oracle form by connecting with oracle database and or runtime I have connected succesfully with ms sql server database wtih EXEC_SQL package. The syntax is as follows:
open connection with odbc
open cursor
parse ddl statement in the cursor
execute cursor
close cursor
close connection
All the above steps are working except the last one. while closeing the odbc connection it's giving internal errro.
So please show me how to disconnect succesfully through this package.
Thansk & Regards,
Habeeb.
[email protected]

Similar Messages

  • In Captivate 7, how can I call another action from within an action?

    I have a conditional action called FakeSuccessRewind. Now I need to call another function called ShowGrayBalloons02 from within its Else statement, but I couldn't find something like "Execute Advanced Action." Can anybody share some tips here? Thanks!
    Below are screenshots of my two actions:
    1) FakeSuccessRewind (if/else). Here I need to call the 2nd action from the Else statement, underneath the statement Go to the next slide.
    2) ShowGrayBalloons02. Note this function has five seperate runs when the variable is decrementing from 5-1.
    Thanks a lot!
    Melissa

    You can't, you need to add the other action into the first one.

  • Calling another midlets mehtod within the same suite

    i hope this is the right board...
    hi all,
    i have a midlet suite containing two midlets and i want to call methods from one midlet within the other midlet. its more than just sharing data (for that i already use the recordstore) so i really must call the method.
    how can i do this?
    simply creating a new instance or calling a static method didn't work here...
    tia
    mmkl

    hi,
    i'am also not so familiar with the pushregistry, but i already tried different samples...
    as far as i know (and tested) the midlet that later is responsible for 'listen' to incomming connections must register itself (or beeing registered in the jad-file, but static registrations is not able to react on already used ports).
    the fact why i'm using two midlets is because my application must connect itself to a servlet and this must be done in a thread seperated from the commandlistener thread. another issue is, that an incoming connection starts the midlet automaticaly.
    my application is primary designed for blackberry's and there the incomming connection forces the midlets display to be shown on the desktop, because of that i need a single midlet for the ui and one for the incomming and outgoing connections without an ui.
    ok, this is the application background, now back to the exception ;)
    i debuged the application as far as possible and the exception occures at
    ListenAndStore listenAndStore = new ListenAndStore();and with stepwise debuging this creation of the second midlet calls
    javax.microedition.lcdui.Displayand within this class, at line 2000 i guess, the exception is raised. i don't konw why this class iss called becaus my second midlet extens only midlet an implements no interface.
    i read somwhere, that every midlet has his own display, but i don't read or know why this should be a security problem :(
    mmkl

  • Calling another cache from within AbstractProcessor.process fails, why?

    I want to enrich a certain data object in a distributed cache via the EntryProcessor framework. The new data is looked up from another nearby cache.
    However, when calling otherCache.get(id) Coherence throws an exception saying that it does not allow blocking calls from within a processor:
    *[java] Caused by: com.tangosol.util.AssertionException: poll() is a blocking call and cannot be called on the Service thread...*
    Is this fixable? What am I missing? Does anyone recommend alternative ways to read data from other caches inside AbstractProcessor?
    Thanks in advance,
    -Stefan
    This is the calling code that executes in the node where the primary object is:
    public class ExternalPropertiesUpdateProcessor extends AbstractProcessor implements PortableObject {
    @Override
    public Object process(InvocableMap.Entry entry) {
    Session session = null;
    if (entry.isPresent()) {
    session = (Session) entry.getValue();
    NamedCache cidCache = CacheFactory.getCache("cidCache");
    Long oldCid = new Long(97);
    CidConversion cidCon = (CidConversion) cidCache.get(oldCid); // * it fails here with above exception!
    session.setCid(cidCon.getNewCid());
    session.setState(Session.SESSION_CLOSED);
    entry.setValue(session); // make session changes durable in cache
    return session;
    Edited by: [email protected] on Dec 10, 2009 9:35 AM

    Ben Stopford wrote:
    Hi Rob
    You mention:
    If you call back to the same cache service via an invocation service, you still risk a deadlock or a livelock due to thread-pool depletion. It looks like it is working, then you may run into the problem. It is not 100% safe.which sparked my interest. Would you mind elaborating a little further. I'd always assumed that the threadpools for separate services were independent and thus there was no chance of deadlock from cross-service calls such as this.
    Thanks in advance
    BenHi Ben,
    as I mentioned, it can cause a problem if you indirectly call back to a service which was on the call stack.
    Let's see an example:
    You send an entry processor to a cache in service A, which synchronously (with the query() method) calls to Invocation service I in which the invocable agent sends an entry-processor to service A (again) targeted to an entry on the same node.
    Let's for the sake of the simplicity of the example suppose service A has a thread pool of size 2.
    You send two such entry-processors on entries residing in the same node.
    We now have a possible deadlock. If both entry-processors entered the first process() method (doesn't matter what entry as long as they are on the same node), they can both proceed into the invocation service call, but from that none of them can proceed further to the inner invoke() call, because there are no more free threads in service A!!! Poof, deadlock, both threads will wait until a thread becomes available... and none will become available because none of the service calls can proceed.
    Of course, starting with 3.5 the Guardian will kill one of the threads (at least), and in earlier version it will also time out, but the point is that they will not be able to complete in this scenario.
    Best regards,
    Robert

  • I want to send a response from the servlet and then call another servlet.

    Hi,
    I want to send a response from the servlet and then call another servlet. can this happen. Here is my scenario.
    1. Capture all the information from a form including an Email address and submit it to a servlet.
    2. Now send a message to the browser that the request will be processed and mailed.
    3. Now execute the request and give a mail to the mentioned Email.
    Can this be done in any way even by calling another servlet from within a servlet or any other way.
    Can any one Please help me out.
    Thanks,
    Ramesh

    Maybe that will help you (This is registration sample):
    1.You have Registration.html;
    2.You have Registration servlet;
    3.You have CheckUser servlet;
    4.And last you have Dispatcher between all.
    See the code:
    Registration.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
      <HEAD>
        <TITLE>Hello registration</TITLE>
      </HEAD>
      <BODY>
      <H1>Entry</H1>
    <FORM ACTION="helloservlet" METHOD="POST">
    <LEFT>
    User: <INPUT TYPE="TEXT" NAME="login" SIZE=10><BR>
    Password: <INPUT TYPE="PASSWORD" NAME="password" SIZE=10><BR>
    <P>
    <TABLE CELLSPACING=1>
    <TR>
    <TH><SMALL>
    <INPUT TYPE="SUBMIT" NAME="logon" VALUE="Entry">
    </SMALL>
    <TH><SMALL>
    <INPUT TYPE="SUBMIT" NAME="registration" VALUE="Registration">
    </SMALL>
    </TABLE>
    </LEFT>
    </FORM>
    <BR>
      </BODY>
    </HTML>
    Dispatcher.java
    package mybeans;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.ServletException;
    import java.io.IOException;
    import javax.servlet.RequestDispatcher;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Dispatcher extends HttpServlet {
        protected void forward(String address, HttpServletRequest request,
                               HttpServletResponse response)
                               throws ServletException, IOException {
                                   RequestDispatcher dispatcher = getServletContext().
                                   getRequestDispatcher(address);
                                   dispatcher.forward(request, response);
    Registration.java
    package mybeans;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Registration extends Dispatcher {
        public String getServletInfo() {
            return "Registration servlet";
        public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            ServletContext ctx = getServletContext();
            if(request.getParameter("logon") != null) {          
                this.forward("/CheckUser", request, response);
            else if (request.getParameter("registration") != null)  {         
                this.forward("/registration.html", request, response);
    CheckUser.java
    package mybeans;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class CheckUser extends Dispatcher {
        Connection conn;
        Statement stat;
        ResultSet rs;
          String cur_UserName;
        public static String cur_UserSurname;;
        String cur_UserOtchestvo;
        public String getServletInfo() {
            return "Registration servlet";
        public void service(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            try{
                ServletContext ctx = getServletContext();
                Class.forName("oracle.jdbc.driver.OracleDriver");
                conn = DriverManager.getConnection("jdbc:oracle:oci:@eugenz","SYSTEM", "manager");
                stat = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
               String queryDB = "SELECT ID, Login, Password FROM TLogon WHERE Login = ? AND Password = ?";
                PreparedStatement ps = conn.prepareStatement(queryDB); 
               User user = new User();
            user.setLogin(request.getParameter("login"));
            String cur_Login = user.getLogin();
            ps.setString(1, cur_Login);
            user.setPassword(request.getParameter("password"));
            String cur_Password = user.getPassword();
            ps.setString(2, cur_Password);
         Password = admin");
            rs = ps.executeQuery();
                 String sn = "Zatoka";
            String n = "Eugen";
            String queryPeople = "SELECT ID, Surname FROM People WHERE ID = ?";
           PreparedStatement psPeople = conn.prepareStatement(queryPeople);
                      if(rs.next()) {
                int logonID = rs.getInt("ID");
                psPeople.setInt(1, logonID);
                rs = psPeople.executeQuery();
                rs.next();
                       user.setSurname(rs.getString("Surname"));
              FROM TLogon, People WHERE TLogon.ID = People.ID";
                       ctx.setAttribute("user", user);
                this.forward("/successLogin.jsp", request, response);
            this.forward("/registration.html", request, response);
            catch(Exception exception) {
    }CheckUser.java maybe incorrect, but it's not serious, because see the principe (conception).
    Main is Dispatcher.java. This class is dispatcher between all servlets.

  • Calling another web dynpro in a web dynpro programm

    Hi experts,
    I am new to web dynpro. And I am working on several web dynpro applications. I just want to know how to call another web dynpro within a web dynpro application. Don't use popups, I'd like the web dynpro work together in the same window just like a wizard.
    Thanks a lot.
    Guo Guo Qing
    Edited by: guoqing guo on Dec 24, 2007 6:59 AM

    Hi Guo,
    Yes, you can achieve it by Component Usage. You can embed other component's Interface views into your own Windows. Check out the component Usage information in help.sap.com to get a clear idea of it.
    Regards
    Raja Sekhar

  • Can a function module call another function module

    Can a function module call another function module:-
      within the same function group
    (ii)  within different function  groups

    Hi,
    We can call function from another function. If there is a function which is like a calculator and all the operations are from different functions then we have to call the functions from the calculator function for different functions.
    If all the function are from same function group, Then the data is globally available to all the functions with in the group.
    Otherwise we have to declare the data definitions for each of the functions if they are in different function groups.  
    Yes it is possible to call a function module from another function module:-
    within the same function group
    (ii) within different function groups
    Reward.

  • Calling another project

    I am calling another project from within a project. This
    works fine, but what I want to do is call the second proejct, run
    it, and then when it finishes continue with the orginal project, at
    the point where I called the second one. That is, play screens 1-5,
    give the option to run the second project, if the user runs it,
    then return to the original project starting with screen 6.
    I don't see an option for what to do at the end of the second
    project to do this (Stop project, Loop project etc.). Or can it be
    done? Thanks.

    Hi bobelmore
    One thing you might be able to do is to launch the second
    project in a new browser instance. Your user would then close the
    browser, at which point they would return to the movie they were in
    to begin with. The original movie would not continue until they
    returned and clicked a button. To do this, insert a click box or
    button that would call the second project. Note that to the right
    of where you specify the project is a down arrow. Click that and
    you can select "New" to open in a new window. Click a second time
    and you can DE-select "Continue playing project" (or "Continue
    playing movie" if you are using Captivate 1)
    Hope this helps a smidge... Rick

  • Connecting to Another Database

    Hi,
    Can I connect to another database such as Pointbase from JDeveloper?
    If yes, how?
    Thanks,
    Rajeev.

    Rajeev,
    In Jdeveloper you have a Connection Navigator that you use to configure named connections. All you need to do is to define the JDBC string in there.
    Frank

  • Is it possible to calling another stored procedure in another database?

    Hello all, I hope you can help me out.
    I need to call another stored procedure in another database? Is it possible?
    I know you can call another stored procedure in the same package:
    Var_SQL :='call SP_Tes (''' || Var_1 || ''',''' || Var_2 ||''')' ;
    EXECUTE IMMEDIATE Var_SQL;
    But how do call it if its in another database? I assume, I'd have to open a new connection to it, then call it...
    Please help me. thanks

    I managed to find my synonym;
    select synonym_name, table_owner, table_name from all_synonyms where synonym_name = 'PKG_EDONWEB70'
    (BTW, its upper case sensitive, I eventually found out)
    But as you said; "anyway, what..."
    1)Crete synonym with the dblink, which is the same DB as the one I'm using:chec
    create public synonym pkg_edonweb70test2 for [email protected]
    Result: ok2)check it exists:
    select synonym_name, table_owner, table_name from all_synonyms where synonym_name = 'PKG_EDONWEB70TEST2'
    Result: ok3)check it runs in sql:
    DECLARE
        P_RETURNVALUE1 number;
    BEGIN
        PKG_EDONWEB70TEST2.SP_TESTSMB_DESTINATION ( P_RETURNVALUE1 );   
        COMMIT;
    END;
    Result: ok4)Add it to the strored procedure that is going to call it
    PROCEDURE sp_testSMB_origin(P_RETURNVALUE1 OUT number) IS
            thissql varchar(1000);      
        BEGIN
        BEGIN
            PKG_EDONWEB70TEST2.SP_TESTSMB_DESTINATION ( P_RETURNVALUE1 );   
            COMMIT;
        END;
        end sp_testSMB_origin;
    Result: FAIL; pls-00201: identifier 'PKG_EDONWEB70TEST2' must be declared

  • Calling Form on another Database

    Hi
    What would be the best method to open a form in a different application, on a different instance (same DB version - 10g2)?
    Would it not be logical for the Open_Form to have username, password, and connect string parameters along with the 'session' parameter?
    What I do now is:
    Web.Show_Document(my_IAS/forms90/f90servlet?form=my_form&userid=something/pwd@connectstring&separateFrame=false&otherparams= etc. etc., '_blank');
    It works, but it leaves the ugly grey window opened after exiting form, even with separateFrame=false, that user has to close separately. If I use self instead of blank then it just kills the calling application end exits to desktop.
    Is there a more elegant way to call a form, temporary log in with different credentials, then logout after exiting form, and return back to the original form in the original app?
    Thanks
    Daniel

    Depending on exactly what version you are using, using WEB.SHOW to call another form may not be the best way of doing it. If you are not using SSO and you are using a newer Forms version, you likely are ok. Regarding the exiting of the form and the applet container that remains (what you call gray screen), this is easy to overcome and could result in a cleaner behavior. Simply create a POST-FORM trigger. In that trigger use WEB.SHOW to send the browser to a page of choice. Be sure to include the "_self" target. Similar can also be done using WebUtil's WebUtil_Session function. This is a good option because it could be used in the event the form crashes. Refer to the Builder help for more info about WebUtil and its functions.
    As for connecting to one db or another, well this will mostly depend on what behavior you want. If you are trying to open another form that has no direct relation to the first and they don't need to speak to each other, then WEB.SHOW might be a good approach.

  • HT4356 can i airprint to my airprint printer remotely, with ipad, from another wifi connection or only when i am within my own network?

    can i airprint to my airprint printer remotely, with ipad, from another wifi connection or only when i am within my own network?

    Air print, and the normal hp airprint set up requires that the pad and the printer be on the same wifi net work.  The 'connecting' is done by your router.  That means remote printing wont work with the out of the box stuff.  I think you might find some 3rd party apps that do support remote  printing, but i have not seen any reports from users that found a really good solution.  Print n share reads like it might work, i am sure some users will chime in.

  • Could i use another database

    Im wondering if i can use another database for the workflow engine. I mean it comes with a database managment by default i want to know if a can use another one (SQL server)

    Hi,
    We have been using jtds driver , which is free and the fastest and without any bugs until now, we have been using it for 4 months now.
    The part below explain how to set up your mssql server with jtds driver.
    create a db lets call is bpel
    then run these queries on it. basically to create the tables, these files are
    domain_sqlserver.ddl
    server_sqlserver.ddl
    workflow_sqlserver.sql
    sensor_sqlserver.sql
    located at
    /OraBPELPM_1/integration/orabpel/system/database/scripts
    After that download the jtds driver for sql server.
    We do not use the microsofts jdbc driver for mssql, although we have tried it.
    It doesnt work properly, with the bpel process manager, basically it has some problem with select image and blob types from DB.
    Anyways, the best one we found was for jtds, it works great and is the fastest I beleive.
    We used data direct's jdbc driver but its not free and after doing some benchmark tests we found jtds was the fastest.
    mkdir -p jdbc/jTDS/unzip
    cd jdbc/jTDS/unzip
    download the jtds-1.2-dist.zip from
    wget http://surfnet.dl.sourceforge.net/sourceforge/jtds/jtds-1.2-dist.zip
    unzip jtds-1.2-dist.zip
    cd unzip
    cp jtds-1.2.jar OraHome_1/integration/orabpel/system/appserver/oc4j/j2ee/home/applib/
    You will now have to configure MsSQL in your data-sources.xml file.
    Microsoft SQL Server Database Configuration
    Oracle Bpel now needs to be configured to use Microsoft SQL Server, using the JDBC drivers.
    cd OraHome_1/integration/orabpel/system/appserver/oc4j/j2ee/home/config/
    vi data-sources.xml
    You must then place the following xml within the file:
    <data-source class="net.sourceforge.jtds.jdbcx.JtdsDataSource"
    name="BPELServerDataSource"
    location="jdbc/BPELServerDataSourceWorkflow"
    xa-location="BPELServerDataSource"
    ejb-location="jdbc/BPELServerDataSource"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    username="BPEL_user"
    password="bpeluser!">
    <property name="serverName" value="server_name"/>
    <property name="databaseName" value="database_name"/>
    <property name="portNumber" value="1433"/>
    </data-source>
    <data-source class="net.sourceforge.jtds.jdbcx.JtdsDataSource"
    name="AdminConsoleDateSource"
    location="jdbc/AdminConsoleDateSource"
    xa-location="AdminConsoleDateSource"
    ejb-location="jdbc/AdminConsoleDateSource"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    username="user_name"
    password="password">
    <property name="serverName" value="server_name"/>
    <property name="databaseName" value="database_name"/>
    <property name="portNumber" value="1433"/>
    </data-source>
    <data-source class="net.sourceforge.jtds.jdbcx.JtdsDataSource"
    name="BPELSamplesDataSource"
    location="jdbc/BPELSamplesDataSource"
    xa-location="BPELSamplesDataSource"
    ejb-location="jdbc/BPELSamplesDataSource"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    username="user_name"
    password="password">
    <property name="serverName" value="server_name"/>
    <property name="databaseName" value="database_name"/>
    <property name="portNumber" value="1433"/>
    </data-source>
    Run the BPEL server and everything should work fine.

  • Accessing another database from HTMLDB

    All is there a way to do selects on another database from within an HTMLDB application.

    We have several applications on our intranet, all requiring login & password. I was unable to hit the needed tables directly outside the application as I'm not a DBA and they've never given me access to the schema names. So while trying to connect to those same tables as I do with Crystal Reports, I just went to the network drive where the TNSNAMES file is located, hunted for the IP of the server I was looking for, used that SID and did the following:
    Database Link Name - (whatever I want)
    Connect to Schema - (used my username that I use with crystal)
    Password - (same password used in crystal)
    Remote Hostname or IP - used stolen IP found in TNSNAMES
    Remote Host Port - used port found in TNSNAMES
    SID or Service Name - same as in crytal but also found in tnsnames.
    After that I had no problem hitting the tables I wanted as my username and login gets me the access I need.
    I can't tell for sure why I don't need the actual schema name and why my username works instead. I'm just glad it does as I can now use the necessary tables to do MY authentication scheme without relying having to ask to get access to the scheme used by the department. They wouldn't give it to me anyway:)
    Hope that helped, I know it didn't explain why it works tho.
    Not sure what you mean by the SQL query... that is done for you in HTML DB in the connect string created by the link.
    If you mean how do you hit the link you use it prefaced by the at sign "@" as in gimme what I want from the database @(the link name you made)

  • How to use an Object Type from Another Database

    Hi,
    I have this requirement that I need to call a stored procedure from another DB (db1) but I am having a problem with this because one of the input parameters uses an object type defined in that DB (db1). Is it possible to use an object type from another database? TIA!

    Sven W. wrote:
    At least for queries, but I think also for procedure arguments..You (both) probably missed my post?
    We can't use a remote type as procedure argument, even with the same OID.
    It's OK for query on a remote object column though :
    SQL> conn remote_user@remote_db
    Entrez le mot de passe :
    Connecté.
    SQL> create type mytype oid '19A57209ECB73F91E03400400B40BBE3'
      2  as object (att1 number);
      3  /
    Type créé.
    SQL> create table mytable (col1 mytype);
    Table créée.
    SQL> insert into mytable values (mytype(777));
    1 ligne créée.
    SQL> create or replace function myfunc (p_in in mytype) return number
      2  is
      3  begin
      4   return p_in.att1;
      5  end;
      6  /
    Fonction créée.
    SQL> disconn
    Déconnecté de Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> conn my_user@local_db
    Entrez le mot de passe :
    Connecté.
    SQL> create type mytype oid '19A57209ECB73F91E03400400B40BBE3'
      2  as object (att1 number);
      3  /
    Type créé.
    SQL> select * from mytable@test_dbl;
    COL1(ATT1)
    MYTYPE(777)
    SQL> declare
      2   res number;
      3  begin
      4   res := myfunc@test_dbl(mytype@test_dbl(777));
      5  end;
      6  /
    res := myfunc@test_dbl(mytype@test_dbl(777));
    ERREUR à la ligne 4 :
    ORA-06550: Ligne 4, colonne 26 :
    PLS-00331: référence non valide à REMOTE_USER.MYTYPE@TEST_DBL.WORLD
    ORA-06550: Ligne 4, colonne 2 :
    PL/SQL: Statement ignored
    SQL> declare
      2   res number;
      3  begin
      4   res := myfunc@test_dbl(mytype(777));
      5  end;
      6  /
    res := myfunc@test_dbl(mytype(777));
    ERREUR à la ligne 4 :
    ORA-06550: Ligne 4, colonne 9 :
    PLS-00306: numéro ou types d'arguments erronés dans appel à 'MYFUNC'
    ORA-06550: Ligne 4, colonne 2 :
    PL/SQL: Statement ignored

Maybe you are looking for