Sessioninfo with 1 database connection

Has anyone found a way to serve multiple rowsetinfo component
with one sessioninfo component? I tried using the getconnection
method but another database session is created when the frame is
created.
null

Thanks for replying. I actually did not state my problem well
enough. I looking at the situation from an application
standpoint where each frame had a rowsetinfo that would
reference 1 common sessioninfo. It seems that a sessioninfo and
rowsetinfo objects are so dependent(i.e. refreshing query) that
one sessioninfo could not serve multiple rowsetinfos on
different frames. I hope somebody has some additional
suggestions.
Thanks.
sb (guest) wrote:
: You can associate mutliple rowsetInfo to the same session
using
: setSession method.
: -sb.
: Andrew Ryals (guest) wrote:
: : Has anyone found a way to serve multiple rowsetinfo
component
: : with one sessioninfo component? I tried using the
: getconnection
: : method but another database session is created when the
frame
: is
: : created.
null

Similar Messages

  • JCAP512 and JCAP6 conflict with concurrent database connectivity

    So here is the situation:
    Environment:
    - We have a production JCAP6 appserver (AIX server 1) running a project pulling data from database A
    - We have 4 JCAP512 domains on AIX Servers 2,3,4 running 4 distinct projects pulling data from server A
    - All project run on a schedule of 5 minutes and login to the server with the same login
    - Database A is SQL Server
    - repository based code
    Scenario:
    - All 5 above processes run concurrently in the greater JCAPS environment.
    - When all 5 processes are running, the JCAP6 process runs fine with no issue but at the same time the 4 JCAP512 processes hang on the database side waiting for a resultset with a wait status of ASYNC_NETWORK_IO
    - As soon as the JCAP6 process completes, all 4 JCAP512 processes start running with no errors. Once the JCAP6 process starts again, same result.
    - We shut off the JCAP6 process and all 4 JCAP512 processes run with no issue
    So after my high-school proof setup above my question comes to what is going on??? All of these processes run on their own isolated physical and application servers. Their only commonaliy is the login to the database. Are there any known database connectivity settings that would limit user transactions if another (same) user connection currently exists?
    Has anybody seen anything like this? Ay assistance would be greatly appreciated.
    Bryan
    Edited by: bgrant88 on Jan 29, 2010 2:15 PM

    I've never worked with the old version of the toolkit, so I don't know how it did things, but looking inside the SQL prep VI, it only generates a command, and the the column name VI wants a recordset. I'm not super familiar with all the internals of ADO, but my understanding is that is standard - you only have the columns after you execute the command and get the recordset back. What you can apparently do here is insert the Execute Prepared SQL VI in the middle and that will return what you need.
    I'm not sure why it worked before. Maybe the execute was hidden inside the prep VI or maybe you can get the column names out of the command object before execution. In general, I would recommend considering switching to the newer VIs.
    Try to take over the world!

  • Problem With Midlet Database Connectivity

    Hi, I am into an application which reures database connectivity.I want to connect to Ms Access as backend with JDBC support.Ive searched a lot but found RMS as the only answer.I will be very thankful if some one can send me a code snippet or some link to an article which shows the trail to my problem.

    You can't have an MS Access database on the phone itself. And even if you can (on an MS SmartPhone maybe?), MIDP has no way to connect to it.
    But if you need to connect to a database that's hosted on a server, then what you have to do is set up a regular web server (using ASP, Servlets, PHP, whatever you fancy), and communicate with this server using the General Connection Framework (that's the javax.microedition.io.* classes). The web server, instead of outputting data in HTML format, can output the data in a format you design and know how to read and parse on your MIDlet (for example, for a simple application a comma separated string will do, for something more complicated maybe you want to use XML, or even develop your own binary format).
    If you want the data to be stored on the client then I'm afraid you're stuck with the RMS.
    shmoove

  • Why handle count keeps increasing with active database connection?

    Hi,
    I have an application in which windows handle count keeps increasing..I did not find any reason why this is happening? could you please help me out? below is the code:
    I have also tried to close the database connection but not work.
    using System;
    using System.IO;
    using System.Data.Common;
    using System.Windows.Forms;
    using System.Threading;
    using System.Configuration;
    using System.Data;
    using System.Data.SqlClient;
    namespace SampleAppWithDbConnection
        class Program
            private static SqlConnection _oCon = null;
            public static SqlConnection oCon
                get
                    if (_oCon == null)
                        _oCon = new SqlConnection();
                    return _oCon;
                set
                    _oCon = value;
            public static int gIntervalo = 1000;
            [STAThread]
            public static void Main(string[] args)
                var gStrCon = ConfigurationManager.ConnectionStrings["Sql-ConnString-Token"].ToString();
                fConectaBase(oCon, gStrCon);
                fProcessa();
            private static void fProcessa()
                try
                    do
                        Thread.Sleep(gIntervalo);
                    while (true);
                catch (Exception)
            internal static bool fConectaBase(SqlConnection pCon, string pConnectionString = "")
                if (pCon.State != ConnectionState.Closed)
                    pCon.Close();
                pCon.ConnectionString = (pConnectionString == "") ? pCon.ConnectionString : pConnectionString;
                pCon.Open();
                return true;

    Hello Pramod,
    >>I have an application in which windows handle count keeps increasing
    If the windows handle(I assume you mean the object handles in Taks Manager bar) keeps increasing, it should means that the project keeps allocating new objects and does not close/dispose them. I notice that you are using ADO.NET API, I am wondering how you
    manage these connections, do you close/dispose the connection immediately after using them? If not, please do it and it is recommended.
    Please check if you call method to close/dispose connections in a finalize method, if so, this is not recommended since in a finalize method, these connections object would still keep alive and does not return to the connection pool, and for new connection
    request, application might increase more connection number to meet the request.
    You could make a test to call GC.Collect() to test if there is a memory leak, if it has, you could check this
    article, or it could be also a handle leak, this
    blog might be helpful for it.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Please help with this Database Connection error

    Hi,
    there is an asp application related to Invoices that uses RDO object concept to connect to the database. Backend is oracle 10g. Application works fine in retrieving data from several tables except for one part of the application. Here the application needs to display the details of the Invoice once the user puts a checkmark beside the invoice number. The code works in a loop to display each invoice selected.
    Problem is that it works upto about 15 continuous selections and after that it displays this error.
    error '800a9c42'
    IM006: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
    This occurs on a line which contains a function that is used to get data from the resultset, which inturn should run a query.
    I tried to increase the timeout for the ODBC connection but to no avail. It uses a DSN connection with Microsoft odbc oracle driver.
    Can any one suggest please?
    Many thanks
    Sri

    Look at http://support.microsoft.com/kb/q264012/
    It is a known issue in MDAC, with an easy solution.

  • Problem with DB2 database connection.

    Hello, I configured a DB2 connection. Was also able to create all the view objects. When I run my application using jdeveloper embedded oc4j I am getting the following error: (The connection is already created and the test is successful. I have also created the entity and view objects.)
    WARNING: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.ibm.db2.jcc.DB2Driver
    07/04/25 14:05:12 SEVERE: ApplicationStateRunning.initConnector Error occurred initializing connectors. Exception is: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.ibm.db2.jcc.DB2Driver
    07/04/25 14:05:12 SEVERE: ApplicationStateRunning.initConnector Stack trace: oracle.oc4j.sql.DataSourceException: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.ibm.db2.jcc.DB2Driver
    at com.evermind.server.ApplicationStateRunning.initDataSourceConnectionPool(ApplicationStateRunning.java:2072)
    at com.evermind.server.ApplicationStateRunning.initDataSourceConnector(ApplicationStateRunning.java:2017)

    Copy the DB2 JDBC JAR file to the \j2ee\home\applib dir or the
    C:\JDeveloper\j2ee\home\lib.

  • How can I use SQL TOOLKIT concurrently with Database Connectivity ?

    I have installed LabVIEW 6.1 with the Database Connectivity Toolkit and the SQL Compatibility Toolkit (e.g. _SQL folder). I am trying to make the transition from the SQL Toolkit VIs to the Database Connectivity toolkits, but for compatability with existing systems I would like to be able to run the two sets of VIs concurrently (but not in the same app).
    When I read into 6.1 a connection VI that I wrote with LabVIEW 6.0 and the SQL toolkit the connection reference type gets changed from a number to type connection (see attachments) . Does compatbility mean that my SQL toolkit VIs are converted to a form compatible with the new ADO ?
    Can I use the SQL Toolkit VIs or the Database connectivit
    y VIs in the same installation of 6.1 ?
    Can I have the SQL Toolkit VIs appear on the functions pallette and function as they did when only the SQL toolkit was installed ?
    Attachments:
    CNNCT.vi ‏20 KB
    CNNCT.vi ‏22 KB

    In response to your #2 below:
    Actually it is possible to have the old SQL Toolkit and new Database
    connectivity in the same installation of LabVIEW. I have only tried it on
    6i, but don't see why it wouldn't work on 6.1. The trick is not to install
    the SQL toolkit compatabitily VI's. The old SQL toolkit uses the Intersolve
    dll through ODBC while the new Database connectivity uses ADO so it is
    possible to use both methods not only in the same LabVIEW install, but it
    the same running application. It has been a while since I originally did
    this, so I am posting only to mention that it is possible and not exactly
    how to do it. If anyone is interested in more details just respond.
    Brian
    "Jeff B" wrote in message
    news:[email protected]...
    > First, direct answers to your direct questions:
    >
    > 1. Does compatbility mean that my SQL toolkit VIs are converted to a
    > form compatible with the new ADO ?
    >
    > Yes
    >
    > 2. Can I use the SQL Toolkit VIs or the Database connectivity VIs in
    > the same installation of 6.1 ?
    >
    > No
    >
    > 3. Can I have the SQL Toolkit VIs appear on the functions pallette
    > and function as they did when only the SQL toolkit was installed ?
    >
    > No
    >
    >
    > Now an elaboration:
    >
    > Having the old SQL Toolkit and the new Database Connectivity Toolset
    > installed on the same version of LabVIEW on the same computer is not
    > supported.
    >
    > Once you install the Database Connectivity Toolset, any VIs written
    > with the SQL Toolkit will run, but with the ADO layer, as you
    > suspected.
    >
    > Internally, the only way we can have both the SQL Toolkit and the
    > Database Connectivity Toolset installed on the same computer for
    > troubleshooting customer issues is to have them installed on different
    > versions of LabVIEW. I, for example, have LabVIEW 5.1.2, 6.0.3, and
    > 6.1 all installed on my computer, and I have the SQL Toolkit install
    > on LabVIEW 5.1.2, and the Database Connectivity Toolset installed on
    > LabVIEW 6.0.3. In this configuration I can still run SQL Toolkit VIs
    > independent of the Database Connectivity Toolset if I open and run
    > them in LabVIEW 5.1.2.

  • Help with Database Connected LiveCycle ES4 form

    Hello and thanks for taking the time to read this question, I hope you can help!
    I have a LiveCycle ES 4 form connected to an excel database.  The form has buttons to "Add", "Update" or "Find" a record.  These buttons all work correctly EXCEPT when the server drive that has the Excel file is not available.  In this case I wanted to add code the "Add" button informing the user that there is an error.  I tried adding a try/catch block before the SQL statement that inserts a record into excel but even when I purposely make the Excel file unavailable the try/catch block doesn't seem to work.  The javascript console will show an error but try/catch doesn't seem to trigger.  If I had a javascript syntax error within the try/catch block, it works as expected, but with the database connected form, it appears the try/catch block does not trigger based on errors generated as a result of the database file having an issue.  In this case, the console just shows a "GeneralError: Operation failed." message.  Why doesn't the try/catch block trigger since there is an error as stated on the console?  Is there a work around?  Thanks again for your help!!

    Hello and thanks for taking the time to read this question, I hope you can help!
    I have a LiveCycle ES 4 form connected to an excel database.  The form has buttons to "Add", "Update" or "Find" a record.  These buttons all work correctly EXCEPT when the server drive that has the Excel file is not available.  In this case I wanted to add code the "Add" button informing the user that there is an error.  I tried adding a try/catch block before the SQL statement that inserts a record into excel but even when I purposely make the Excel file unavailable the try/catch block doesn't seem to work.  The javascript console will show an error but try/catch doesn't seem to trigger.  If I had a javascript syntax error within the try/catch block, it works as expected, but with the database connected form, it appears the try/catch block does not trigger based on errors generated as a result of the database file having an issue.  In this case, the console just shows a "GeneralError: Operation failed." message.  Why doesn't the try/catch block trigger since there is an error as stated on the console?  Is there a work around?  Thanks again for your help!!

  • Problem with database connectivity toolkit

    I have problem with Labview database connectivity toolkit. I build and deploy the real_web.vi (attached to the post) to the web server. It seems that the DB Tools Open Connect can not connect to the data base, and it issues the following error:
    NI_Database_API.lvlib:DB Tools Open Connec (String).vi->real_web.vi->real_web.vi.ProxyCallerADO Error: 0x80004005 Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in NI_Database_API.lvlib:DB Tools Open Connec (String).vi->real_web.vi->real_web.vi.ProxyCaller
    But in highlight execution, I do not get this error! My program connects to the database and read the data. What is wrong ?
    Moreover, when I connect to the vi using the web-browser, the cpu usage of ApplicationWebServer process goes up to 100% (The same problem as stated in this post). 
    Attachments:
    real_web.vi ‏28 KB

    Say what you will about the problems that the DCT can cause (and goodness knows I have) my suspicion is that this is not a toolkit ptoblem. When ever something only works with execution highlighting on, two words should immediately jump to mind: "race" "condition".
    Execution highlighting will muck aound with the order in which things get done in your code. Can you post what your code looks like?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Database connection with mysql

    i have my server as follows:
    import java.rmi.*;
    public class JobServer
    public static void main(String[] args)
    try
    JobImpl j = new JobImpl();
    Naming.rebind("//"+"localhost"+"/JobImpl",j);
    System.out.println("Registered");
    catch (Exception e)
    System.out.println("Exception occured in JobServer ... " +e);
    and my interface implementation:
    import java.rmi.*;
    import java.rmi.server.*;
    import java.sql.*;
    public class JobImpl extends UnicastRemoteObject implements JobInt
    String host="localhost";
    String user="root";
    String pass="admin";
    String db="db";
    String conn;
    ResultSet rs;
    Statement st;
    public JobImpl() throws RemoteException
    super();
    try
    Class.forName("com.mysql.jdbc.Driver");
    conn = "jdbc:mysql://" + host + "/" + db + "?user=" + user + "&password=" + pass;
    Connection Conn = DriverManager.getConnection(conn);
    st = Conn.createStatement();
    catch (Exception e)
    System.out.println("problem while establishing connection"+e);
    public String getname(int jobno) throws RemoteException
    try
    rs = st.executeQuery("Select name from job whwre jobno="+jobno);
    rs.next();
    return(rs.getString("name"));
    catch (Exception e)
    e.printStackTrace();
    return null;
    when i 'javac JobServer' on the command prompt, i have the following error:
    problem while establishing connection java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    Exception occured in JobServer ... java.rmi.ConnectionException: Connection refused to host: localhost; nested exception is :
    java.net.ConnectionException: Connection refused: connect
    apparently theres a problem with my database connection... the connection isnt right? plz help

    problem while establishing connection
    java.lang.ClassNotFoundException:
    com.mysql.jdbc.DriverSo fix that first. It's just a matter of installing the MySQL JAR file(s) in the appropriate place, i.e. somewhere on your CLASSPATH. Read their documentation.

  • J2EE Struts - Database connection failed - help???:(

    Hello,
    I have built a little web application and it works without any problems. In the next step I tried to add a database connection but I have already worked on it for at least one day and I could not fix the problem with the database connection.
    I downloaded the MySQL Server 5.0 and installed it, furthermore I have downloaded the jdbc driver mysql-connector-java-3.1.11.zip and extracted it to the MySQL Server 5.0 directory. Furthermore I have added under system settings - system - etended - system variables the whole path to the driver -> C:\Programme\MySQL\MySQL Server 5.0\mysql-connector-java-3.1.11\mysql-connector-java-3.1.11-bin.jar to the CLASSPATH systemvariable.
    Then I have startet the SQL Server 5.0 with mysqld --console from the command line.
    Furthermore I have added under Project-Properties-Java Build Path - Libraries - Add External JARs in Eclipse the mysql-connector-java-3.1.11-bin.jar to my Struts WebProject.
    To test the whole thing I have added to the existing test-database from mysql a table named owner and wanted to test the database connection in the Action-class with the following statements - I quote the whole execute method of the OwnerAction class:
    public ActionForward execute(
                     ActionMapping mapping,
                     ActionForm form,
                     HttpServletRequest request,
                     HttpServletResponse response)
                     throws Exception {
                   OwnerForm ownerForm = (OwnerForm) form;
                   String greet = ownerForm.getGreet();
                   String name = ownerForm.getName();
                   request.setAttribute("name", name);
                   request.setAttribute("greet", greet);
                   String address = ownerForm.getAddress();
                   String email = ownerForm.getEmail();
                   int tel = ownerForm.getTel();
                   Connection conn = null;
                   Statement stmt = null;
                   ResultSet rs = null;
                   DriverManager.registerDriver(new org.gjt.mm.mysql.Driver());
                   conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","sa");
                   try {
                         //conn = dataSource.getConnection();
                         stmt = conn.createStatement();
                         int id = 0;
                         rs = stmt.executeQuery("select max(id) as counter from owner");
                         while(rs.next()){
                            id = rs.getInt("counter");
                         id += 1;
                         stmt.executeUpdate("insert into owner values("+id+", '"+greet+"', '"+name+"', '"+email+"', '"+address+"', "+tel+")");
                         rs.close();
                         stmt.close();
                         conn.close();
                      catch(SQLException e){
                         throw new SQLException("database error");
                      // Forward control to the specified success target
                      return (mapping.findForward("success"));
          }But when I execute the WebApplication and the Action will be called the following error message appears in the browser:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    root cause
    java.lang.NoClassDefFoundError: org/gjt/mm/mysql/Driver
         com.asprise.struts.action.OwnerAction.execute(OwnerAction.java:72)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
    It must depend with anything that the driver was not found but I have defined it in the CLASSPATH variable and added it to the Web-Project in eclispe.
    Has anybody an idea what I have else made wrong or have forgotten??:(:(:(
    thanks in advance
    lg
    pat

    One thing I have forgotten - I have also copied the mysql-connector-java-3.1.11-bin.jar in the WebRoot\WEB-INF\lib directory of my EasyStruts WebApplication.
    Can anything else be wrong??:(:((
    regards

  • J2EE - database connection failed...:(:(:(

    Hello,
    I have built a little web application and it works without any problems. In the next step I tried to add a database connection but I have already worked on it for at least one day and I could not fix the problem with the database connection.
    I downloaded the MySQL Server 5.0 and installed it, furthermore I have downloaded the jdbc driver mysql-connector-java-3.1.11.zip and extracted it to the MySQL Server 5.0 directory. Furthermore I have added under system settings - system - etended - system variables the whole path to the driver -> C:\Programme\MySQL\MySQL Server 5.0\mysql-connector-java-3.1.11\mysql-connector-java-3.1.11-bin.jar to the CLASSPATH systemvariable.
    Then I have startet the SQL Server 5.0 with mysqld --console from the command line.
    Furthermore I have added under Project-Properties-Java Build Path - Libraries - Add External JARs in Eclipse the mysql-connector-java-3.1.11-bin.jar to my Struts WebProject.
    To test the whole thing I have added to the existing test-database from mysql a table named owner and wanted to test the database connection in the Action-class with the following statements - I quote the whole execute method of the OwnerAction class:
    public ActionForward execute(
                     ActionMapping mapping,
                     ActionForm form,
                     HttpServletRequest request,
                     HttpServletResponse response)
                     throws Exception {
                   OwnerForm ownerForm = (OwnerForm) form;
                   String greet = ownerForm.getGreet();
                   String name = ownerForm.getName();
                   request.setAttribute("name", name);
                   request.setAttribute("greet", greet);
                   String address = ownerForm.getAddress();
                   String email = ownerForm.getEmail();
                   int tel = ownerForm.getTel();
                   Connection conn = null;
                   Statement stmt = null;
                   ResultSet rs = null;
                   DriverManager.registerDriver(new org.gjt.mm.mysql.Driver());
                   conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","sa");
                   try {
                         //conn = dataSource.getConnection();
                         stmt = conn.createStatement();
                         int id = 0;
                         rs = stmt.executeQuery("select max(id) as counter from owner");
                         while(rs.next()){
                            id = rs.getInt("counter");
                         id += 1;
                         stmt.executeUpdate("insert into owner values("+id+", '"+greet+"', '"+name+"', '"+email+"', '"+address+"', "+tel+")");
                         rs.close();
                         stmt.close();
                         conn.close();
                      catch(SQLException e){
                         throw new SQLException("database error");
                      // Forward control to the specified success target
                      return (mapping.findForward("success"));
          }But when I execute the WebApplication and the Action will be called the following error message appears in the browser:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    root cause
    java.lang.NoClassDefFoundError: org/gjt/mm/mysql/Driver
         com.asprise.struts.action.OwnerAction.execute(OwnerAction.java:72)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
    It must depend with anything that the driver was not found but I have defined it in the CLASSPATH variable and added it to the Web-Project in eclispe.
    Has anybody an idea what I have else made wrong or have forgotten??:(:(:(
    thanks in advance
    lg
    pat

    One thing I have forgotten - I have also copied the mysql-connector-java-3.1.11-bin.jar in the WebRoot\WEB-INF\lib directory of my EasyStruts WebApplication.
    Can anything else be wrong??:(:((
    regards

  • How to correct close database connection after report generation

    Hello
    I have problem a with alive database connection after report creation and report  closing. How to properly to close connection to database?
    Best regards
    Edited by: punkers84 on Jun 17, 2011 10:38 AM

    that's what I am doing... after viewing the report, I call the close method on the window closing event of the container window. but the connection is still open. I had a lot of other issues with my jdbc driver but after downgrading to an older version those issues are resolved.Only this one is still there! Is there any other way to close the connection (like using dbcontroller or etc.)?

  • Database Connection Problem-SQL SERVER 2005

    Dear all,
    I have been struggling with this database connection.I have installed sql server 2005 in my PC and i am trying to connect to the Database Adventity.But it is showing port 1432 invalid.I have placed sqljdbc jar in my lib folder.If i dont specify Database name then it will print hi Message..if i specify Database name then the error will come.
    MY CODE is::
    <%@page import="java.sql.*,java.io.*,java.lang.*,java.util.*,java.util.Vector,bean.*" %>
    <%
              Connection con;
              Statement stmt;
              String url= "jdbc:sqlserver://156.0.11.140:1433/Adventity";
              Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
              con = DriverManager.getConnection(url,"sa","hcl@123");
              stmt = con.createStatement();     
              out.println("hi");
    %>
    THE ERROR IS:
    javax.servlet.ServletException: The port number 1433/Adventity is not valid.
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
         org.apache.jsp.adv1_jsp._jspService(adv1_jsp.java:66)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    root cause
    PLEASE HELP ME TO GET RID OUT FROM THIS PROBLEM.
    THANKS IN ADVANCE.

    hi
    i have given what u said and it is not working but it displays blank page.even i tried to getdate..
    pls help me
    <%@page import="java.sql.*,java.io.*,java.lang.*,java.util.*,java.util.Vector,bean.*" %>
    <%
              Connection con;
              Statement stmt;
              try
              String url= "jdbc:sqlserver://156.0.11.140:1433;databaseName=test";
              Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
              con = DriverManager.getConnection(url,"sa","hcl@123");
              stmt = con.createStatement();
              String user="select getdate();"
              System.out.println(user);
         catch (Exception e) {
                   out.println(e.toString());
              } finally {
                   try {
                   } catch (Exception e) {
                        e.printStackTrace()     ;
    %>

  • Session scope/Database connection

    Hi y'all!
    I got some questions about session scope and database connections:
    I'm using a bean called dataBase. With this bean i open a database connection and execute some sql statements. the bean has page-scope, which means, as far as i know, the bean will be destroyed after the user leaves the current page.
    but what happens with my dataBase connection?!? could it be possible that it is still active after the bean was destroyed? so should i close my database connection manually or will it close automatically when the bean is beeing destroyed?
    thanks for your help!

    You should explicitly close the connection. One way is to use the finally clause to ensure that the connection is closed even if your code throws an exception.

Maybe you are looking for

  • Text is arbitrarily appearing as dingbats font.

    Some, but not all, text on some web pages is arbitrarily appearing as a dingbats font.

  • Stretching the region dynamically in a facet of panel splitter.

    Hi, Jdev version- 11.1.1.6.0 We are using a panel splitter in a jspx page and inside on of the facet of the panel splitter we are using a taskflow with page fragments as a region.The use case is as user can stretch the panel splitter,we want to stret

  • ClassNotFoundException in servlet

    I'm trying to connect to a database using driver com.mysql.jdbc.Driver, but I get a ClassNotFoundException when accessing the servlet. I wrote a program and using the same driver I could access the DB. Why can't the servlet find the driver? I'm using

  • Installing a downloaded version of photoshop elements 8 for the mac

    Can someone please help me.  I downloaded version 8 of photoshop elements for the mac (a paid version and not the trial).  When i click on the set-up icon and go through all the required information (i.e., serial number, etc.), the screen goes to che

  • Session expired (timeout) without ADF Security using.

    Hello! I have a problem with my application in which i use own security realization without ADF Security using. I realized custom implementation of javax.servlet.http.HttpSessionListener interface, in which i log session creation and expiration event