Many Statement/ResultSet using a single Connection

Hi, all,
I'm a beginner to Java and JDBC, and i faced a problem doing some tests with JDBC.
My application is designed to be a 2 tier desktop application, with a single main frame where the user can open many child frames inside it. Each child frame could, for example, display a table in a grid, so i can have many grids showing many tables at the same time.
In my first test, i create a single connection, prepare 2 statements from this connection and get 2 result sets, one from each statement.
When i get the second result set, it throws an exception saying "The result set is closed".
I searched about his in Google, and found some articles saying it is not possible to have more than one opened resultset from one connection.
Is this information accurate?
If so, is there a way to workaround this? In my case, it would te too much expensive to open many connections for each user using the application, and it's not practical, at least now, to develod a third tier to the application, to share a connection pool, for example.
Maybe i'm not able to figure out some important aspect of working with JDBC, in this case i appreciate any advice that could help in my case.
Regards,
Fabiano

I presume if i decide to use a connection pool, i will need a separate application to act as itWrong.If your answer was supposed to get me curious, you got it :-)
So there is probably something wrong in my assumptions, so i would appreciate if you help to point where i am wrong.
My scenario is a local network with many computers (lets say 30) running my desktop (2-tier) application, all accessing the same database.
Today, in my actual application and in the above scenario, i will have 30 connections to the database, and the database server is starting to get busy to handle them all, so i don't want to raise the number of connections.
Reading your answer, i presume one of the following
a) your solution would be to use a connection pool inside each application instance
b) there is some better technique i'm not aware about and you do, because i'm used to write 2-tier applications and i'm blind to something simple and functional
In case of :
a) If each application's connection pool have an average of 5 connections, i will have 150 connection to the database, and it will probably starve.
b) I would appreciate if you point the name of the technique, framework, or some link so i can start to study and test it
Regards,
Fabiano

Similar Messages

  • Getting Multiple Recordsets using A Single Connection using jdbc-odbc

    I have a java application which uses sql 7.0 database server. I want to have multiple recordsets created using a single connection using jdbc-odbc bridge. Kindly let me know the procedure.

    Well, you create a recordset, then you create another one, and so on. Are you actually having a problem or you just don't know where to start?

  • Setting up connection using a single connection string.

    Post Author: DubbleOh7
    CA Forum: Data Connectivity and SQL
    I know about the ConnectionInfo object in for .NET crystal reports, but for security purposes we don't have access to a password of any kind, nor do we pass them around our web pages, they are used for login access only. So how can I just set a connection string for the report to access a SQL Server database? I prefer NOT to do the Dataset work around. Its a busy server and the report could contain up to 20,000 records with lots of fields. Not efficient. I also know I could make an object fill it with data from a data reader, but not sure thats as efficient as just having the report execute the stored procedure I have. I also don't want the report to pop up that login page automatically for the users since they have already logged into the website. I'm looking forward to any ideas or suggestions. Thanks in advance for any info or suggestions you may have!
    Summary:
    I don't want to use datasets due to inefficiency and overhead of several thousand records.
    I just want to be able to use a connection string using windows authentication enabled for the report connection to a SQL Server database.
    This is for SQL 2K5..calling a stored procedure
    Crystal reports for ASP.NET (VB language solutions preferred)
    Basically I'd like to use a trusted connection and
    ReportConnection.ServerName = "SERVER"
    ReportConnection.DatabaseName = "DATABASE"
    ReportConnection.IntegratedSecurity = True
    doesn't get me there.

    If your Internet Service Provider is DSL follow this link

  • Using a single connection for jsp, servlets and classes

    Hi! I'm building a web site that uses JSP, Servlets and some classes. I use database access in all my pages. I want to open a connection and use it for all the pages while the user is in my site, so I don't need to open a connection with every new jsp or servlet page. My software must be capable of connection with various databases, like SQLServer, Oracle, Informix, etc... so the solution must not be database (or OS or web server) dependant.
    Can you help me with this? Some ideas, links, tips? I'll REALLY appreciate your help.
    Regards,
    Raul Medina

    use an initialiation servlet with pooled connection which can be accessed as sesssion object.
    Abrar

  • Multiple DataSource using single Connection Pool

    Previously using Weblogic 6.1 we had a configuration where multiple Datasources used a single connection pool. Now that we are in the process of upgrading to Weblogic 9.1, we are attempting to recreate the same configuration.
    The Weblogic 9.1 upgrade wizard appears to have created the relevent datasource & connection pool configuration files but when attempting to use these I am receiving the following errors:
    ####<30-Jan-2007 11:18:21 o'clock GMT> <Info> <JDBC> <tu0991ws9004> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1170155901758> <BEA-001508> <Destroying Connection Pool TestDSLegacyPool.>
    ####<30-Jan-2007 11:18:21 o'clock GMT> <Info> <JDBC> <tu0991ws9004> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1170155901758> <BEA-001155> <The following exception has occurred:
    weblogic.common.ResourceException: Unknown Data Source TestDSLegacyPool
         at weblogic.jdbc.common.internal.ConnectionPoolManager.shutdownAndDestroyPool(ConnectionPoolManager.java:419)
         at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:251)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
         at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    >
    ####<30-Jan-2007 11:18:21 o'clock GMT> <Error> <Deployer> <tu0991ws9004> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1170155901773> <BEA-149205> <Failed to initialize the application 'TestDSLegacyPool' due to error weblogic.application.ModuleException: .
    weblogic.application.ModuleException:
         at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:257)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
         at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    weblogic.common.ResourceException: weblogic.common.ResourceException: DataSource(TestDSLegacyPool) can't be created with non-existent Pool (connection or multi) (Beach Brochure Browse Pool)
         at weblogic.jdbc.common.internal.DataSourceManager.checkDataSource(DataSourceManager.java:239)
         at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:247)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
         at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    weblogic.common.ResourceException: DataSource(TestDSLegacyPool) can't be created with non-existent Pool (connection or multi) (Beach Brochure Browse Pool)
         at weblogic.jdbc.common.internal.DataSourceManager.verifyPoolDeployment(DataSourceManager.java:607)
         at weblogic.jdbc.common.internal.DataSourceManager.checkDSConfig(DataSourceManager.java:594)
         at weblogic.jdbc.common.internal.DataSourceManager.checkDataSource(DataSourceManager.java:236)
         at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:247)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
         at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    The configuration files content is :
    TestDSLegacyPool-9290-jdbc.xml
    <?xml version='1.0' encoding='UTF-8'?>
    <jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/910/domain.xsd">
    <name>TestDSLegacyPool</name>
    <internal-properties>
    <property>
    <name>LegacyType</name>
    <value>3</value>
    </property>
    <property>
    <name>LegacyPoolName</name>
    <value>Beach Brochure Browse Pool</value>
    </property>
    </internal-properties>
    <jdbc-data-source-params>
    <jndi-name>beachBrochureBrowseDS</jndi-name>
    <global-transactions-protocol>None</global-transactions-protocol>
    </jdbc-data-source-params>
    </jdbc-data-source>
    CP-Beach_Brochure_Browse_Pool-1043-jdbc.xml
    <?xml version='1.0' encoding='UTF-8'?>
    <jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/910/domain.xsd">
    <name>Beach Brochure Browse Pool</name>
    <internal-properties>
    <property>
    <name>LegacyType</name>
    <value>1</value>
    </property>
    </internal-properties>
    <jdbc-driver-params>
    <url>jdbc:oracle:thin:@aserver:1522:adb</url>
    <driver-name>oracle.jdbc.driver.OracleDriver</driver-name>
    <properties>
    <property>
    <name>user</name>
    <value>gf_user</value>
    </property>
    <property>
    <name>dll</name>
    <value>ocijdbc9</value>
    </property>
    <property>
    <name>protocol</name>
    <value>thin</value>
    </property>
    </properties>
    <password-encrypted>{3DES}4UT5899x/Z4=</password-encrypted>
    </jdbc-driver-params>
    <jdbc-connection-pool-params>
    <initial-capacity>1</initial-capacity>
    <max-capacity>3</max-capacity>
    </jdbc-connection-pool-params>
    </jdbc-data-source>
    Would anyone be able to point me in the right direction with this? Configuring the Datasources through the Admin Console creates a single Datasource configuration file that contains its relevent connection pool configuration, but the Weblogic Upgrade wizard creates a Datasource config file and a separate connection pool config file. What would I need to do to use the config files generated by the Weblogic Upgrade wizard?
    Any help appreciated
    Thanks
    Andrew

    Andrew Harrison wrote:
    Previously using Weblogic 6.1 we had a configuration where multiple Datasources used a single
    connection pool. Now that we are in the process of upgrading to Weblogic 9.1, we are attempting
    to recreate the same configuration.Hi, sorry to say, that is no longer possible:
    http://e-docs.bea.com/wls/docs90/jdbc_admin/jdbc_intro.html#1044158
    Simplified JDBC Resource Configuration
    In WebLogic Server 9.0, the number of JDBC resource types was reduced to simplify JDBC configuration and to reduce the likelihood
    of configuration errors. Instead of configuring a JDBC connection pool and then configuring a data source or tx data source to
    point to the connection pool and bind to the JNDI tree, you configure a data source that encompasses a connection pool.
    Note: Because of the new configuration design, you can no longer have multiple data sources that point to a single connection
    pool. Instead, you can create additional data sources, each with its own pool of connections, or you can bind a single data source
    to the JNDI tree with multiple names. See Binding a Data Source to the JNDI Tree with Multiple Names for more information.
    Joe
    >
    The Weblogic 9.1 upgrade wizard appears to have created the relevent datasource & connection pool
    configuration files but when attempting to use these I am receiving the following errors:
    ####<30-Jan-2007 11:18:21 o'clock GMT> <Info> <JDBC> <tu0991ws9004> <AdminServer> <[ACTIVE]
    ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <>
    <1170155901758> <BEA-001508> <Destroying Connection Pool TestDSLegacyPool.>
    ####<30-Jan-2007 11:18:21 o'clock GMT> <Info> <JDBC> <tu0991ws9004> <AdminServer> <[ACTIVE]
    ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <>
    <1170155901758> <BEA-001155> <The following exception has occurred:
    weblogic.common.ResourceException: Unknown Data Source TestDSLegacyPool
         at weblogic.jdbc.common.internal.ConnectionPoolManager.shutdownAndDestroyPool(ConnectionPoolManager.java:419)
         at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:251)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
         at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    ####<30-Jan-2007 11:18:21 o'clock GMT> <Error> <Deployer> <tu0991ws9004> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1170155901773> <BEA-149205> <Failed to initialize the application 'TestDSLegacyPool' due to error weblogic.application.ModuleException: .
    weblogic.application.ModuleException:
         at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:257)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
         at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    weblogic.common.ResourceException: weblogic.common.ResourceException: DataSource(TestDSLegacyPool) can't be created with non-existent Pool (connection or multi) (Beach Brochure Browse Pool)
         at weblogic.jdbc.common.internal.DataSourceManager.checkDataSource(DataSourceManager.java:239)
         at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:247)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
         at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    weblogic.common.ResourceException: DataSource(TestDSLegacyPool) can't be created with non-existent Pool (connection or multi) (Beach Brochure Browse Pool)
         at weblogic.jdbc.common.internal.DataSourceManager.verifyPoolDeployment(DataSourceManager.java:607)
         at weblogic.jdbc.common.internal.DataSourceManager.checkDSConfig(DataSourceManager.java:594)
         at weblogic.jdbc.common.internal.DataSourceManager.checkDataSource(DataSourceManager.java:236)
         at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:247)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
         at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    The configuration files content is :
    TestDSLegacyPool-9290-jdbc.xml
    <?xml version='1.0' encoding='UTF-8'?>
    <jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/910/domain.xsd">
    <name>TestDSLegacyPool</name>
    <internal-properties>
    <property>
    <name>LegacyType</name>
    <value>3</value>
    </property>
    <property>
    <name>LegacyPoolName</name>
    <value>Beach Brochure Browse Pool</value>
    </property>
    </internal-properties>
    <jdbc-data-source-params>
    <jndi-name>beachBrochureBrowseDS</jndi-name>
    <global-transactions-protocol>None</global-transactions-protocol>
    </jdbc-data-source-params>
    </jdbc-data-source>
    CP-Beach_Brochure_Browse_Pool-1043-jdbc.xml
    <?xml version='1.0' encoding='UTF-8'?>
    <jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/910/domain.xsd">
    <name>Beach Brochure Browse Pool</name>
    <internal-properties>
    <property>
    <name>LegacyType</name>
    <value>1</value>
    </property>
    </internal-properties>
    <jdbc-driver-params>
    <url>jdbc:oracle:thin:@aserver:1522:adb</url>
    <driver-name>oracle.jdbc.driver.OracleDriver</driver-name>
    <properties>
    <property>
    <name>user</name>
    <value>gf_user</value>
    </property>
    <property>
    <name>dll</name>
    <value>ocijdbc9</value>
    </property>
    <property>
    <name>protocol</name>
    <value>thin</value>
    </property>
    </properties>
    <password-encrypted>{3DES}4UT5899x/Z4=</password-encrypted>
    </jdbc-driver-params>
    <jdbc-connection-pool-params>
    <initial-capacity>1</initial-capacity>
    <max-capacity>3</max-capacity>
    </jdbc-connection-pool-params>
    </jdbc-data-source>
    Would anyone be able to point me in the right direction with this? Configuring the Datasources
    through the Admin Console creates a single Datasource configuration file that contains its relevent
    connection pool configuration, but the Weblogic Upgrade wizard creates a Datasource config file and
    a separate connection pool config file. What would I need to do to use the config files generated
    by the Weblogic Upgrade wizard?
    Any help appreciated
    Thanks
    Andrew

  • Is it a bad idea to use a single read only Connection?

    I am developing a client/server application, where each client request executes in a separate thread. Currently i create a new Connection object for ANY database access. I am wondering if there is any advantage changing this, to use a single Connection object for read only access, but still creating new Connection objects for read/write access.
    Does anyone have any opinions on this matter?
    I am aware that if i go with this approach, and someone causes a SQL exception on the read only connection that it will be closed. Right now this appears to be the main disadvantage to this approach.

    I don't like the single, read-only connection idea.ack
    A single connection throughout the execution of the
    application has several security disadvantages. It is
    also less scalable. I've read other problems
    associated with it but I none come to mind at the
    moment.What are the security implications that you speak of?
    I think for the type of application i am developing,database security is not a concern, as all users are able to access the same tables.
    Basically in our application, the security is in the application domain, not the database.

  • Multiple sources in a single Connection Pool

    Hi Folks,
    I have a requirement to import data from two diffrent data sources( for example : Two diffrent database of Oracle in two diffrent servers) using a single connection pool to the physical layers of OBIEE RPD. Can anyone please suggest whether this is possible or not? If yes please provide the steps.

    DB Links is an Oracle feature, not an OBIEE. You have to create your DB link in one of the schemas in DB1 so you can connect from there to DB2. Then you can simply create a query that joins data from both DBs:
    SELECT * FROM DUAL d1, DUAL@DB2 d2
    WHERE d1.dummy = d2.dummy
    Search on Google as this is a very popular and simple feature to use. It will allow you to use one connection pool that's connection to two DBs.

  • How to use same database connection..... for application forms.

    hello
    im creating an database application using java swing and mysql.... it an mdi application ..... i want to know that how use a single connection for all forms in the application.... any example... coz im new for the java swing and mysql application .... ill be thankful for reply and solution....

    Crost post:
    http://forum.java.sun.com/thread.jspa?threadID=785812&messageID=4466100#4466100

  • Simultaneously Connecting Multiple Tables of the same Database to Textboxes of the same Form using a single ADO Control Code using VB6 Enterprise Edition and MS Access 2007

    Iv 10 Tables consisting of atleast 10 fields each in a single Database. Bt, Im only able to connect 1 table at a time to a form using an ADO Control. Im able to add data from table 'student' to text-boxes in my form. Bt, hw can I add data from field(0) of
    Table 'Student' to Textbox1 and data from field(0) of Table 'Marks' to Textbox2 using VB6??
    This is the current sample coding iv got to connect a single table to a form:
    Global con As New ADODB.Connection
    Global rs As New ADODB.Recordset
    Public Function Connect()
    If con.State = 1 Then con.Close
    con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\bca.mdb;Persist Security Info=False"
    End Function
    Private Sub Add_Click()
    If rs.State = 1 Then rs.Close
    rs.Open "select * from student", con, adOpenDynamic, adLockOptimistic
    rs.AddNew
    rs.Fields(0) = (Text1.Text)
    rs.Fields(1) = (Text2.Text)
    rs.Fields(2) = (Text13.Text)
    rs.Fields(3) = (Text4.Text)
    rs.Fields(4) = (Text5.Text)
    rs.Fields(5) = (Text6.Text)
    rs.Fields(6) = (Text7.Text)
    rs.Fields(7) = (Text8.Text)
    rs.Fields(8) = (Text9.Text)
    rs.Fields(9) = (Text10.Text)
    rs.Fields(10) = (Text11.Text)
    rs.Update
    MsgBox " Record Added"
    End Sub
    What can I do to add fields from 2 different tables to different text boxes within the same form using a single ado control using vb6 and MS Access 2007??

    Hi,
    Since VB6 product is not supported in this forum, you may go to these forums for support:
    #Where to post your VB 6 questions
    http://social.msdn.microsoft.com/Forums/en-US/6a0719fe-14af-47f7-9f51-a8ea2b9c8d6b/where-to-post-your-vb-6-questions
    Thank you for your understanding.
    Best regards,
    Franklin
    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.

  • Creating new Connections/Statements/ResultSets

    Hi,
    RDMS = Sybase
    JDBC = Jconnect 5.5 obtained from Sybase website
    Purpose:
    To loop through the program below with different queries and produce
    a resultset.
    Details:
    I have a program that creates a query stores it in a static setter.
    The program calls the program below. The program below:
    (1) obtains the query from a static getter
    (2) creates a connection/statement/resultset
    (3) returns to the calling program where
    (a) resultset is displayed
    (b) calls close() in the program below which closes the
    connection/statement/resultset
    Problem:
    I thought that creating a new connection/statement/resultset
    each time the program below is called would work.
    The program below returns the correct resultset for the first query
    but when called with a different query returns the first resultset that
    was generated.
    Question:
    Do I have to use different objects for the connection/statement/resultset each time the program is called
    even though the existing connection/statement/resultset is closed
    before a new connection/statement/resultset is created ?
    if yes,
    I don't how to change the object for connection/statement/resultset
    dynamically each time the program below is called.
    Any assistance provided would be greatly appreciated !!
    Thanks for your time,
    YAM-SSM
    package ecmutl;
         import java.awt.*;
         import java.sql.*;
         public class DbConnect implements Runnable {     
              public static Thread queryThread = null;     
              public static Font        fntF;
              public static Connection conn = null;
              public static ResultSet rs = null;
              public static Statement stmt = null;      
              public static String nodename = EcmUtlLogicals.getNodeName();
              public static String password =     EcmUtlLogicals.getPassword();
              public String newline = "\n";
              public static String sqlstate;
              public static String message;
              public static String queryThreadDone = "false";
              public static String query = EcmUtlLogicals.getQuery();
              public static String dbname = EcmUtlLogicals.dbname;
              public static String username = EcmUtlLogicals.username;
                 public static int SybaseReturnCode; 
              void Connect() {               
                        try {                              
                        Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();
                           conn = DriverManager.getConnection("jdbc:sybase:Tds:"+nodename+"/"+dbname,username,password);     
                   catch (SQLException exc) {
                        sqlstate = exc.getSQLState();          
                        message = exc.getMessage();
                        SybaseReturnCode = exc.getErrorCode();
                   catch (InstantiationException iste) {
                   catch (ClassNotFoundException cnfe) {
                   catch (IllegalAccessException iae) {
                   if (queryThread == null) {
                        queryThread = new Thread(this, "Query");
                        queryThread.start();               
                   } // close if                 
              } // close Connect method
              public void run() {               
                  try {                             
                                     stmt = DbConnect.conn.createStatement();                 
                        rs = stmt.executeQuery(query); 
                        queryThread = null;     
                   } // close try
                   catch (SQLException sqlex) {
                        sqlstate = sqlex.getSQLState();                     
                        message = sqlex.getMessage();
                        SybaseReturnCode = sqlex.getErrorCode();
                                    queryThread = null;
                            } // close catch
                            catch (java.lang.Exception ex) {
                          ex.printStackTrace ();
                   } // close catch
                   queryThreadDone = "true";
              } // close run method
              static void close() {     
                   try {
                         if ( rs != null){
                              rs.close();          
                         if ( stmt != null){
                              stmt.close();
                         if ( conn !=  null){
                              conn.close();     
                   } // close try
                   catch (SQLException error){     
              }// close close()          
    } // close DbConnect class     

    Then I'd say you should write a QueryThread object
    that extends Thread and takes an SQL statement in its
    constructor. In the run method, create a connection,
    statement, and result set to run that query, close
    them in reverse order when you're done, and provide a
    getter to give access to the results. Don't return a
    reference to the result set; put the results in a data
    structure or CachedRowSet and close out the result set
    as soon as you're done with it. ResultSets are
    database cursors, which are scarce resources.
    With this design, every thread has its own connection
    and resources. They can't conflict with each other. -
    MODHi MOD,
    I finished coding a QueryThread object exactly as you instructed
    and IT WORKS !!!!! The calling program calls QueryThread by:
    QueryThread qt = new QueryThread(query);
    qt.start();
    QueryThread code:
    package ecmutl;
         import java.awt.*;
         import java.sql.*;
         import java.util.List;
         import java.util.*;
         public class QueryThread extends Thread {
              public static Thread queryThread = null;     
              public static Font        fntF;
              public static Connection conn = null;
              public static ResultSet rs = null;
              public static Statement stmt = null;      
              public static String nodename = EcmUtlLogicals.getNodeName();
              public static String password = EcmUtlLogicals.getPassword();
              public String newline = "\n";
              public static String sqlstate;
              public static String message;
              public static String queryThreadDone = "false";
              public String query;
              public static String dbname = EcmUtlLogicals.dbname;
              public static String username = EcmUtlLogicals.username;     
              public static int SybaseReturnCode;
              public QueryThread(String query) {
                   this.query = query;                 
              public void run() {               
                   try {              
                        Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();
                        conn = DriverManager.getConnection("jdbc:sybase:Tds:"+nodename+"/"+dbname,username,password);                                                                                                         
                        stmt = conn.createStatement();                 
                        rs = stmt.executeQuery(query);
                        List resultSetArray = new LinkedList();
                        resultSetArray = new ArrayList(); 
                        if (rs != null) {     
                             int i;
                             ResultSetMetaData rsmd = rs.getMetaData ();
                             int numCols = rsmd.getColumnCount ();
                             for (i=1; i<=numCols; i++) {
                                  if (i > 1) resultSetArray.add(",");
                                  resultSetArray.add(rsmd.getColumnLabel(i));
                             resultSetArray.add(newline);
                             boolean more = rs.next ();
                             while (more) {
                                  for (i=1; i<=numCols; i++) {
                                       if (i > 1) resultSetArray.add(",");
                                       resultSetArray.add(rs.getString(i)); 
                                  resultSetArray.add(newline);
                                  more = rs.next ();
                             EcmUtlLogicals.setResultSetArray(resultSetArray);
                             if (rs != null){
                                  rs.close();
                             if (stmt != null) {
                                  stmt.close();
                             if (conn != null) {
                                  conn.close();
                        queryThread = null;                                            
                   catch (SQLException sqlex) {
                        sqlstate = sqlex.getSQLState();                     
                        message = sqlex.getMessage();
                        SybaseReturnCode = sqlex.getErrorCode();
                        queryThread = null;
                   catch (java.lang.Exception ex) {
                                     ex.printStackTrace ();
                   queryThreadDone = "true";
         }I have only be using Java for three months. Sometimes one needs a teacher to go along with the APIs.
    Thanks for your patience/help/time
    YAM-SSM

  • How many memory is used for the process of one connection?

    Hi,
    how many memory is used for the process of one connection in unix
    when the user connects to the database?
    Thanks,

    Write some queries using v$sesstat, v$statname, v$session to find the statistics for different stats. Query name from v$statname and find whatever you wants. I don't think there is a common rule that tells how much memory will be used for each connection, it depends on different factors like , resources available, type of databases, database memory settings etc.
    Example query.
    select s.osuser osuser,s.serial# serial,se.sid,n.name,
    max(se.value) maxmem
    from v$sesstat se,
    v$statname n
    ,v$session s
    where n.statistic# = se.statistic#
    and n.name in ('session pga memory','session pga memory max',
    'session uga memory','session uga memory max')
    and s.sid=se.sid
    group by n.name,se.sid,s.osuser,s.serial#
    order by 2
    ;

  • How to send multiple files in parallel using ftp with single connection

    Hi.
    i have written code for file upload manager using ftp..
    it perfectly working with sequence file uploading in single connection..
    And i tried to upload multiple files with parallel processing in a single connection.... but it is not working properly.. i also used thread concept
    but single file only transfered and connection refused...
    my code here...
    //////////////////// main class //////////////////////////////////////////
    ftp.connect();
    ftp.login();
    String [] archivos = new  String[100];
                                      File dir = new File("C:\\Files Uploading\\");
                                       archivos = dir.list();
                                       for (int s=0; s<archivos.length;s++)
         //Start Data Transfer Here
         new DataTransfer(archivos[s]).start();
                                       Thread.sleep(1000);
    /////////////////////// thread class ////////////////////////////////
    class DataTransfer extends Thread
          String FileName="";
          String LocalPath="",RemotePath="";
           public DataTransfer(String fname)
         FileName = fname;
         LocalPath = "C:\\Files Uploading\\" + FileName;
         RemotePath = FileName;
         System.out.println(LocalPath);          
            public void run()
                        System.out.println("DataTransfer Started");
         /File Transfer Here
         try
               FileInputStream input = new FileInputStream(LocalPath);
                               Ftp_Client.storeFile(RemotePath,input);
         System.out.println("Successfully sent : " + RemotePath);
         catch (Exception exc)
              System.out.println(exc.getMessage());
              System.out.println("DataTransfer Ended");
         }otherwise tell me any other alternate way

    And i tried to upload multiple files with
    parallel processing in a single connection....
    but it is not working properly.FTP isn't a multiplexing protocol. How could it work at all?

  • How to use single connection

    Hello Gurus,
    I am new in adf and using jdev 11.1.2.3.
    I am developing application in which i am using dynamic shell UI. The structure of application is i have one main application modules with the UI shell. The other modules are developed in separate application and has its own data control and task flows and then i deployed them as adf library. Then i am consuming the task flow in the main application.
    As i mention each module has its own data control, so when i open a module it makes new connection with database. It means if i have opened ten modules then it is opening ten connections with database.
    Is is possible i can configure somewhere to use single connection for all modules and not to open the connection for each module.
    And one more thing if i undeploy the application the connection is still with database as v$session view shows it. How i can close connection if i close the tab in ui shell.
    Thanks,

    Hi, You can explore the option of nesting your AM.  Check below links to know more about them.
    Decompiling ADF Binaries: What you may need to know about Nested Application Module
    Nested application modules | ADF KickStart
    Good luck !

  • How to post multiple http requests using a single http connection in java

    I am using the httpurlconnection class and it allows only to post one request on a connection. I require to post multiple http requests by opening a single connection. Code examples please. Thanx in advance.

    Hi
    I found this article through Google. I hope it helps a little
    http://www.developer.com/tech/article.php/761521
    D

  • Update multiple rows & columns using a single statement

    I have the following table with tablename - emp
    first_name last_name age
    aaa bbb 31
    56
    78
    ggg hhh 36
    2nd & 3rd row contain null values (no data) in first_name & last_name column . I want to update those two rows with data using a single statement. How do I do it?
    I was thinking may be something like the following:-
    UPDATE emp
    SET first_name= , last_name=
    CASE
    WHEN age = 56 THEN 'ccc', 'ddd'
    WHEN age = 78 THEN 'eee', 'fff'
    ELSE first_name, last_name
    END
    -----------------------------------------------

    Can you give an example of a nested decode statement.
    test@ora>
    test@ora>
    test@ora> --
    test@ora> drop table t;
    Table dropped.
    test@ora> create table t as
      2  select rownum x, cast(null as varchar2(10)) y from all_objects
      3  where rownum <= 10;
    Table created.
    test@ora>
    test@ora> select x, y from t;
             X Y
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    10 rows selected.
    test@ora>
    test@ora> -- You want to change the values of y to 'a' through 'j' for x = 1 through 10
    test@ora> -- and y = 'X' otherwise
    test@ora> --
    test@ora> -- Let's say the limit on the number of components were 12
    test@ora> -- Then your decode statement would've been:
    test@ora> --
    test@ora> update t
      2  set y = decode(x,
      3                 1, 'a',
      4                 2, 'b',
      5                 3, 'c',
      6                 4, 'd',
      7                 5, 'e',
      8                    'f');
    10 rows updated.
    test@ora>
    test@ora>
    test@ora> select x, y from t;
             X Y
             1 a
             2 b
             3 c
             4 d
             5 e
             6 f
             7 f
             8 f
             9 f
            10 f
    10 rows selected.
    test@ora>
    test@ora> -- As you can see you are unable to:
    test@ora> --
    test@ora> -- change y to 'g' if x = 7
    test@ora> -- change y to 'h' if x = 8
    test@ora> -- change y to 'i' if x = 9
    test@ora> -- change y to 'j' if x = 10
    test@ora> -- change y to 'X' otherwise
    test@ora> --
    test@ora>
    test@ora> -- What you would do then is -
    test@ora> -- (i)  Let the 11 components remain as they are and
    test@ora> -- (ii) Introduce a nested decode function *AS THE 12TH COMPONENT*
    test@ora> --
    test@ora>
    test@ora> rollback;
    Rollback complete.
    test@ora>
    test@ora> --
    test@ora> update t
      2  set y = decode(x,
      3                 1, 'a',
      4                 2, 'b',
      5                 3, 'c',
      6                 4, 'd',
      7                 5, 'e',
      8                 decode(x,
      9                        6,  'f',
    10                        7,  'g',
    11                        8,  'h',
    12                        9,  'i',
    13                        10, 'j',
    14                            'X')
    15                );
    10 rows updated.
    test@ora>
    test@ora> select x, y from t;
             X Y
             1 a
             2 b
             3 c
             4 d
             5 e
             6 f
             7 g
             8 h
             9 i
            10 j
    10 rows selected.
    test@ora>
    test@ora>HTH
    isotope
    Extrapolate that to 255 components and you get 254 + 255 = 509 components. And so on...
    Message was edited by:
    isotope

Maybe you are looking for

  • How to validate a date in a validation script

    I have a date field for which I have set a validation pattern using its Object palette i.e. Object > Value tab > Validation Pattern > Validation tab. The validation pattern I have there is simply 'date{YYYY-MMM-DD}' with an error message set in the V

  • File conversion error when combining files

    Hello, I am using Adobe Create to combine several files (both word and pdf) into a single pdf document.  I have done this several times in the past with no problems.  However today it won't allow me to combine any documents which are already in pdf f

  • Transaction launcher sales org parameter to ERP

    Hi Experts, We want to pass parameters to the ERP transactions. We are fine with devision an chanel but we cannot access the right ERP SalesOrg format. So fare we access the information in the LTX with this structure : //datacontextCURRENTBT/BTOrderH

  • Moving query from SQV1 to SQ01?

    I have created a query in SQV1 though other users want it in SQ01 how can I do this? Many thanks Also what is the difference between logical database and table?

  • Adobe says mi credit card is invalid

    I got a 1 year suscription to creative cloud. the first month adobe had no issues with my credit card.  But the second month, adobe says mi card is invalid.  now I have only 6 more days of creative cloud, and then I'll be in the dark, without being a