Returning recordsets with PL/SQL and JDBC

can record types be returned from a stored procedure to a java program? if so, what is the return type to set in registerOutParameter(x, ?)?? if not, what is best way to return result sets fro pl stored procedure to a java program
thanx

You can have pl/sql return a Ref Cursor and then get ResultSet from Ref Cursor. For cursor, you do RegisterOutParameter(int, java.sql.Types.Other).

Similar Messages

  • Need help with MS SQL server JDBC driver

    Anyone has experience getting ACS working with SQL2005? We keep getting ‘com.adobe.adept.persist.DatabaseException: java.sql.SQLException: No suitable driver’
    We’re using sqljdbc.jar and sqljdbc4.jar that downloaded from Microsoft website. We added this to every library folder under tomcat, JRE and SDK but it did not help. Any suggestion will be helpful.
    Thanks-

    Hi,
    We have ACS with SQL Server 2005 Std correctly working.
    We have this settings:
    ############ SQL Server Connection ############
    com.adobe.adept.persist.sql.driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
    com.adobe.adept.persist.sql.connection=jdbc:sqlserver://ip-addressSQL:PortSQL;databaseName =Adept
    com.adobe.adept.persist.sql.dialect=microsoft
    com.adobe.adept.persist.sql.user=userSQL
    com.adobe.adept.persist.sql.password=passSQL
    Wi use Microsoft SQL Server JDBC Driver 3.0 downloaded from Microsoft website (http://www.microsoft.com/download/en/details.aspx?id=21599)
    Good luck,

  • Problem with MS SQL 2005 JDBC Conection

    Dear all,
    I am new user of MS SQL Server 2005 database and Java developer.
    When I conect to MS SQL Server 2005 i have a problem with conection.
    First I creat new class named DaoTest to test MS SQL conection.
    Here I show my code complete.
    {color:#0000ff}
    import java.sql.Connection;
    import java.sql.Statement;
    import com.microsoft.sqlserver.jdbc.SQLServerDataSource;
    public class DaoTest {
    private Connection connection;
    public DaoTest() {
    try {
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    SQLServerDataSource ds = new SQLServerDataSource();
    ds.setUser("sa");
    ds.setPassword("deanweb");
    ds.setServerName("localhost");
    ds.setPortNumber(1434);
    ds.setDatabaseName("common");
    connection= ds.getConnection();
    } catch (Exception e) {
    e.printStackTrace();
    public static void main(String[] args) throws Exception {
    DaoTest daoTest1 = new DaoTest();
    DaoTest daoTest2 = new DaoTest();
    }{color}
    {color:#000000}and when I run this class a error appeared:{color}
    {color:#ff0000}com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(Unknown Source)
    at com.microsoft.sqlserver.jdbc.TDSChannel.read(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.Prelogin(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnection(Unknown Source)
    at DaoTest.<init>(DaoTest.java:21)
    at DaoTest.main(DaoTest.java:32)
    {color:#000000}But when i change main methol as{color}:
    {color}{color:#0000ff}public static void main(String[] args) throws Exception {
    DaoTest daoTest1 = new DaoTest();
    daoTest1.connection.close();
    DaoTest daoTest2 = new DaoTest();
    }{color}
    ->>successful.
    {color:#ff0000}{color:#000000}That mean I {color}**can not**{color} creat more than one instance of class DaoTest if i do not close {color:#000000}*daoTest1*'{color}s conection.
    I only see this error with MS SQL Server,none in Postgres or HSQL.
    Please help me.
    Thank for reading and I am waiting for your reply.
    sorry my english.
    [email protected]
    Edited by: DrNhut on Jun 24, 2008 3:39 AM
    Edited by: DrNhut on Jun 24, 2008 3:44 AM

    Thank you.
    I try your code but it didn't work.
    So,here my code with your opinion
    String connectionUrl = "jdbc:sqlserver://localhost:1434;"
                   + "databaseName=common;selectMethod=cursor;";
    //                Declare the JDBC objects.
                   Connection con = null;
                   Statement stmt = null;
                   ResultSet rs = null;
                   try {
    //                Establish the connection.
                   Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
                   con = DriverManager.getConnection(connectionUrl,"sa","deanweb");
                   } catch (Exception e) {
                   e.printStackTrace();
         public static void main(String[] args) throws Exception {
              DaoTest daoTest1 = new DaoTest();
              // daoTest1.connection.close();
              DaoTest daoTest2 = new DaoTest();
         }It throws same error with my last posted.
    I can't use your code exactlyString connectionUrl = "jdbc:sqlserver://localhost:1434/common;selectMethod=cursor";because it throws a new exception:com.microsoft.sqlserver.jdbc.SQLServerException: The port number 1434/common is not valid.
         at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
         at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
         at java.sql.DriverManager.getConnection(DriverManager.java:582)
         at java.sql.DriverManager.getConnection(DriverManager.java:185)May be I change my DBMS instead of MS SQL 2005.
    (I nead a database can manage big data.So,I choose MS SQL).
    thank you.
    DrNhut.
    Edited by: DrNhut on Jun 25, 2008 6:39 PM

  • CRM 5.0 Installation with MS-SQL and windows 2003 server

    Hi,
    I have to install CRM 5.0 with MS-SQL 2005 and ECC 6.0 with Oracle 10g and integrate with QAS(Third party tool).
    My question are:
    1.Can we install all there application on single server.
    2. what s/w units we have to chose generally and what are standard(ie. EP,TREX etc.....)
    3.Can we install the s/w units later after CRM core installation.
    I am a BASIS Consulatnt and first time installing the CRM.
    Regards
    Alok

    Hi Alok,
    1. You can install all the applications in one box, But it is not advisable as the performance of all the applications can degrade.
    2. Software units like EP, Trex are installed based on the business needs, requirements...
    3. You can proceed initially with the installation of CRM Core components and later you can install other components/ software units.
    Thanks
    Ashok. R

  • Customer returns report with f.s,and t.s with coding....used vbak,kna1,

    hai
    my  name is raghu i want some information....any one given functional spech....how to write technical spech with coding....plse send as soon as possible
    plse some example send to me...
    thanks
    raghu

    tell me
    can u have any model ...with f.s and t.s...with coding
    plse send i can prepare ...that is urgent
    raghu

  • Returning recordsets with Java S.P. and JDBC

    i'm curious what the easiest way is to return multiple rows from oracle using a jdbc client and Java stored procedure. the examples i've seen just 'pack' all of the values in the one element arrays used as the OUT parameters. can you use custom objects as parameters? thanx

    You can have pl/sql return a Ref Cursor and then get ResultSet from Ref Cursor. For cursor, you do RegisterOutParameter(int, java.sql.Types.Other).

  • Recordsets with multiple options - AND, OR If Else and the "Any" Rule

    Hi,
    Been trying to get this to work for days now... I have a form with drop down lists that feeds through variables to a search page... The Recordset Jobsearch2 shown below works great so long as a user chooses and option that has info in the DB.... ie all fields must be present. I cannot seem to work out how to achieve and Any rule?...
    I have had 2 options suggested to me...
    a) the code below...
    if(isset($searchsector) && $searchsector !== "") {
    $query_jobsearch2 .= ' AND Sector LIKE "%' . mysql_real_escape_string($searchsector) . '%"';
    putting this in for each option..... but If Im told I have to add this in before the "$jobsearch2 = mysql_query" line... but when I do this the recordset disappears\is deleted...
    b) Using an Array and "Implode" -  this wouldbe great I'm sure if I had any clue how to do this and what it meant.
    MY CURRENT CODE
    <?php require_once('Connections/steelbakercouk_473245_db1.php'); ?>
    <?php
    $searchsector = $_POST['Sector'];
    $searchlocation = $_POST['clocation'];
    $searchmin = $_POST['minsalary'];
    $searchmax = $_POST['maxsalary'];
    $searchtype = $_POST['Type'];
    ?>
    <?php
    mysql_select_db($database_steelbakercouk_473245_db1, $steelbakercouk_473245_db1);
    $query_jobsearch2 = "SELECT jobs.clocation, jobs.Ref_id, jobs.RefCode, jobs.jobtitle, jobs.blurb, jobs.Consultant, jobs.Salary, jobs.tlocation, jobs.Sector, jobs.Type FROM jobs WHERE jobs.Salary BETWEEN '$searchmin' AND '$searchmax' AND clocation = '$searchlocation' AND jobs.Sector  = '$searchsector' AND jobs.Type = '$searchtype'";
    $jobsearch2 = mysql_query($query_jobsearch2, $steelbakercouk_473245_db1) or die(mysql_error());
    $row_jobsearch2 = mysql_fetch_assoc($jobsearch2);
    $totalRows_jobsearch2 = mysql_num_rows($jobsearch2);
    ?>
    Please help... ... pulling my hair out!
    Thanks

    Ok.. I've tried all methods and still not getting anywhere..
    David... following the link you gave me... and to the letter.. apart from GetSQLValueString()which does not seem to exist.
    All it does is return all the records (as per the basic recordset)
    Heres the code.... please please tell me where I am going wrong.... downloaded your book Foundation PHP but struggaling.,
    <?php require_once('Connections/steelbakercouk_473245_db1.php'); ?>
    <?php
    $searchsector = $_POST['Sector'];
    $searchlocation = $_POST['clocation'];
    $searchmin = $_POST['minsalary'];
    $searchmax = $_POST['maxsalary'];
    $searchtype = $_POST['Type'];
    $any = $_POST['any'];
    ?>
    <?php
    $currentPage = $_SERVER["PHP_SELF"];
    mysql_select_db($database_steelbakercouk_473245_db1, $steelbakercouk_473245_db1);
    $expected = array('Sector' => 'text',
                      'clocation'         => 'text',
                      'minsalary'          => 'int',
                      'maxsalary'      => 'int');
    $query_jobsearch2 = "SELECT jobs.clocation, jobs.Ref_id, jobs.RefCode, jobs.jobtitle, jobs.blurb, jobs.Consultant, jobs.Salary, jobs.tlocation, jobs.Sector, jobs.Type FROM jobs";
    $where = false;
    // Loop through the associatiave array of expected search values
    foreach ($expected as $var => $type) {
      if (isset($_GET[$var])) {
        $value = trim(urldecode($_GET[$var]));
        if (!empty($value)) {
          // Check if the value begins with > or <
          // If so, use it as the operator, and extract the value
          if ($value[0] == '>' || $value[0] == '<') {
            $operator = $value[0];
            $value = ltrim(substr($value, 1));
          } elseif (strtolower($type) != 'like') {
            $operator = '=';
          // Check if the WHERE clause has been added yet
          if ($where) {
            $query_search .= ' AND ';
          } else {
            $query_search .= ' WHERE ';
            $where = true;
          // Build the SQL query using the right operator and data type
          $type = strtolower($type);
          switch($type) {
            case 'like':
              $query_search .= "`$var` LIKE " . GetSQLValueString('%' .
    $value . '%', "text");
              break;
            case 'int':
            case 'double':
            case 'date':
              $query_search .= "`$var` $operator " .
    GetSQLValueString($value, "$type");
              break;
            default:
            $query_search .= "`$var` = " . GetSQLValueString($value,
    "$type");
    $jobsearch2 = mysql_query($query_jobsearch2, $steelbakercouk_473245_db1) or die(mysql_error());
    $row_jobsearch2 = mysql_fetch_assoc($jobsearch2);
    $totalRows_jobsearch2 = mysql_num_rows($jobsearch2);
    $queryString_jobsearch2 = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_jobsearch2") == false &&
            stristr($param, "totalRows_jobsearch2") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_jobsearch2 = "&" . htmlentities(implode("&", $newParams));
    $queryString_jobsearch2 = sprintf("&totalRows_jobsearch2=%d%s", $totalRows_jobsearch2, $queryString_jobsearch2);
    ?>

  • Reading Advance Queuing with XMLType payload and JDBC Driver character encoding

    Hi
    I've got a problem retrieving the message from the queue with XMLType payload in Java.
    It was working fine in 10g database but after the switch to 11g it returns corrupted string instead of real XML message. Database NLS_LANG setting is AL32UTF8
    It is said that JDBC driver should deal with that automatically but it obviously don't in this case. When I dequeue the message using database functionality (DBMS_AQ package) it looks fine but not when using JDBC driver so Ithink it is character encoding issue or so. The message itself is enqueued by the database and supposed to be retrieved by dedicated EJB.
    Driver file used: ojdbc6.jar
    Additional libraries: aqapi.jar, xdb.jar
    All file taken from 11g database installation.
    What shoul dI do to get the xml message correctly?

    Do you mean NLS_LANG is AL32UTF8 or the database character set is AL32UTF8? What is the database character set (SELECT value FROM nls_database_parameters WHERE parameter='NLS_CHARACTERSET')?
    Thanks,
    Sergiusz

  • Problem to establish connection between Oracle SQL and JDBC

    Hi friends i have been trying this code from two days i donno whats wrong please try to sort the problem thank u in advance this is my program:
    //This is my Connection class
    package com.java.jdbc.util;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class EmployeeUtil {
    public EmployeeUtil()
    public static Connection getconnection()
    Connection con=null;
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:ORANT","system","manager");
    // Class.forName("sun.jdbc.odbc.OracleDriver").newInstance();
    // con = DriverManager.getConnection("jdbc:odbc:Javatut","System","manager");
    } catch (ClassNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (SQLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (InstantiationException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (IllegalAccessException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    return con;
    //This is my DB class:
    package com.java.jdbc.DB;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import com.java.jdbc.info.EmployeeInfo;
    import com.java.jdbc.util.EmployeeUtil;
    public class EmployeeDB {
    Connection connection=null;
    public EmployeeDB()
    //this.connection=EmployeeUtil.getconnection();
    public void select(EmployeeInfo empinfo)
    this.connection=EmployeeUtil.getconnection();
    String stb = "select * from employee";
    try {
    Statement stmt = connection.createStatement();
    ResultSet rs = stmt.executeQuery(stb);
    System.out.println(rs);
    //EmployeeInfo empinfo = new EmployeeInfo();
    while(rs.next())
    empinfo.setEmpId(rs.getString(1));
    empinfo.setEmpfName(rs.getString(2));
    empinfo.setEmplName(rs.getString(3));
    empinfo.setEmpAge(rs.getString(4));
    empinfo.setEmpSalary(rs.getString(5));
    System.out.println("The EmployeeID is : "+empinfo.getEmpfName());
    System.out.println("The Employee First Name is : "+empinfo.getEmpfName());
    System.out.println("The Employee Last Name is : "+empinfo.getEmplName());
    System.out.println("The Employee Age is : "+empinfo.getEmpAge());
    System.out.println("The Employee Salary is : "+empinfo.getEmpSalary());
    connection.commit();
    } catch (SQLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    //This is my info object
    package com.java.jdbc.info;
    public class EmployeeInfo {
    private String empId;
    private String empfName;
    private String emplName;
    private String empAge;
    private String empSalary;
    public String getEmpAge() {
    return empAge;
    public void setEmpAge(String empAge) {
    this.empAge = empAge;
    public String getEmpfName() {
    return empfName;
    public void setEmpfName(String empfName) {
    this.empfName = empfName;
    public String getEmpId() {
    return empId;
    public void setEmpId(String empId) {
    this.empId = empId;
    public String getEmplName() {
    return emplName;
    public void setEmplName(String emplName) {
    this.emplName = emplName;
    public String getEmpSalary() {
    return empSalary;
    public void setEmpSalary(String empSalary) {
    this.empSalary = empSalary;
    //This is my Controller class:
    package com.java.jdbc.controller;
    import com.java.jdbc.DB.EmployeeDB;
    import com.java.jdbc.info.EmployeeInfo;
    public class EmployeeController {
    public static void main(String args[])
    EmployeeDB empdb = new EmployeeDB();
    EmployeeInfo emp = new EmployeeInfo();
    empdb.select(emp);
    // I got these errors:
    java.sql.SQLException: Io exception: Got minus one from a read call
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:210)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at com.java.jdbc.util.EmployeeUtil.getconnection(EmployeeUtil.java:18)
    at com.java.jdbc.DB.EmployeeDB.select(EmployeeDB.java:20)
    at com.java.jdbc.controller.EmployeeController.main(EmployeeController.java:11)
    Exception in thread "main" java.lang.NullPointerException
    at com.java.jdbc.DB.EmployeeDB.select(EmployeeDB.java:23)
    at com.java.jdbc.controller.EmployeeController.main(EmployeeController.java:11)

    Are you using Oracle 10.2 in shared server configuration under Windows?
    If so it's a driver bug (BUG - Connection pooling with 10g 10.1.3 Preview 4 App Server Oracle suggest to use OCI driver.

  • Problem etablishing connection between oracle SQL and JDBC

    Hi friends i have been trying this code from two days i donno whats wrong please try to sort the problem thank u in advance this is my program:
    //This is my Connection class
    package com.java.jdbc.util;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class EmployeeUtil {
         public EmployeeUtil()
         public static Connection getconnection()
              Connection con=null;
              try {
                   Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
                   //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                   con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:ORANT","system","manager");
              // Class.forName("sun.jdbc.odbc.OracleDriver").newInstance();
              // con = DriverManager.getConnection("jdbc:odbc:Javatut","System","manager");
              } catch (ClassNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (SQLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (InstantiationException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IllegalAccessException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              return con;
    //This is my DB class:
    package com.java.jdbc.DB;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import com.java.jdbc.info.EmployeeInfo;
    import com.java.jdbc.util.EmployeeUtil;
    public class EmployeeDB {
         Connection connection=null;
         public EmployeeDB()
              //this.connection=EmployeeUtil.getconnection();
         public void select(EmployeeInfo empinfo)
              this.connection=EmployeeUtil.getconnection();
              String stb = "select * from employee";
         try {
                   Statement stmt = connection.createStatement();
                   ResultSet rs = stmt.executeQuery(stb);
                   System.out.println(rs);
                   //EmployeeInfo empinfo = new EmployeeInfo();
                   while(rs.next())
                        empinfo.setEmpId(rs.getString(1));
                        empinfo.setEmpfName(rs.getString(2));
                        empinfo.setEmplName(rs.getString(3));
                        empinfo.setEmpAge(rs.getString(4));
                        empinfo.setEmpSalary(rs.getString(5));
                        System.out.println("The EmployeeID is : "+empinfo.getEmpfName());
                        System.out.println("The Employee First Name is : "+empinfo.getEmpfName());
                        System.out.println("The Employee Last Name is : "+empinfo.getEmplName());
                        System.out.println("The Employee Age is : "+empinfo.getEmpAge());
                        System.out.println("The Employee Salary is : "+empinfo.getEmpSalary());
                   connection.commit();
              } catch (SQLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    //This is my info object
    package com.java.jdbc.info;
    public class EmployeeInfo {
         private String empId;
         private String empfName;
         private String emplName;
         private String empAge;
         private String empSalary;
         public String getEmpAge() {
              return empAge;
         public void setEmpAge(String empAge) {
              this.empAge = empAge;
         public String getEmpfName() {
              return empfName;
         public void setEmpfName(String empfName) {
              this.empfName = empfName;
         public String getEmpId() {
              return empId;
         public void setEmpId(String empId) {
              this.empId = empId;
         public String getEmplName() {
              return emplName;
         public void setEmplName(String emplName) {
              this.emplName = emplName;
         public String getEmpSalary() {
              return empSalary;
         public void setEmpSalary(String empSalary) {
              this.empSalary = empSalary;
    //This is my Controller class:
    package com.java.jdbc.controller;
    import com.java.jdbc.DB.EmployeeDB;
    import com.java.jdbc.info.EmployeeInfo;
    public class EmployeeController {
         public static void main(String args[])
              EmployeeDB empdb = new EmployeeDB();
              EmployeeInfo emp = new EmployeeInfo();
              empdb.select(emp);     
    // I got these errors:
    java.sql.SQLException: Io exception: Got minus one from a read call
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
         at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:210)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at com.java.jdbc.util.EmployeeUtil.getconnection(EmployeeUtil.java:18)
         at com.java.jdbc.DB.EmployeeDB.select(EmployeeDB.java:20)
         at com.java.jdbc.controller.EmployeeController.main(EmployeeController.java:11)
    Exception in thread "main" java.lang.NullPointerException
         at com.java.jdbc.DB.EmployeeDB.select(EmployeeDB.java:23)
         at com.java.jdbc.controller.EmployeeController.main(EmployeeController.java:11)

    Are you using Oracle 10.2 in shared server configuration under Windows?
    If so it's a driver bug (BUG - Connection pooling with 10g 10.1.3 Preview 4 App Server Oracle suggest to use OCI driver.

  • Return Recordset with DSN

    Hi
    I'd want return a recordset into a procedure (..curRecord OUT SYS_REFCURSOR) using a connectionstring DSN with provider Microsoft ODBC for Oracle. I can create an ADO connection (MyConnection) and ADO command (MyCommand), but when I execute next statement: Set MyRecordset = MyCommand.Execute(), I have next error: 2147217887. ODBC not admit properties researched.
    When I use a connectionstring with Provider OLE DB for Oracle, I haven't any problem, because I set property PLSQLRSet to True, but Microsoft ODBC for Oracle not have that property.
    Thanks for your cooperation.
    Giovanni.

    Thanks for the reply.
    But I find another way to find that a recordset has no record.
    ResultSet rs = Stmt.executeQuery("select userid from logininfo where userid='"+userid+"'");
    rs.next();
    if(rs.isFirst())
         //code to be executed if it has at least one record in recordset
         else{
    ////code to be executed if no record recordset
    Again thanks for the Help...

  • RETURN ARRAY WITH PL/SQL

    Hi,
    We made a simple pl/sql procedure which insert in a table. With a c# program and odp.net, we call it with a bind array and it works fine.
    Now, we try to inverse the situation.
    Is it possible with odp.net to call a pl/sql procedure which return an array and treat after in a c# program ??
    Thanks in advance

    You should look into a function/procedure that modifies its input arguments. Your java program can read those as well as the basic return value. That way you can have as many 'return values' as you need.

  • I downloaded Mozilla 4 and tried to use it then, I had to delete it and go back to 3.6 vs now I am having problems with my MS SQL 2005 why? What was changed to enable Mozilla 4 to sync with MS SQL and how do I get it corrected?

    After, trying Mozilla 4 beta and then having to go back to a previous vs of Mozilla 3.6.11 my MS OLE DB Provider for SQL 2005 Server has this error message '80040E57' I am using Windows 7 which was pre-installed on my new computer. I do not know how to fix it?

    The latest flash player release is 11,0,1,152.
    Can you upgrade to this version and see whether the crash stil exists?
    Go to get.adobe.com/flashplayer to download and install flash player.
    In case you need direct link to installer/uninstaller, please go to http://forums.adobe.com/message/3952360#3952360 to find them.
    saranlee wrote:
    My computer crashes repeatedly and I get the message pages are not responding do you want to stop, and/or shockwave is not responding do you want to stop. I have Windows XP Service Pack 3, I am having the same issues whether I use Internet Explorer, Google Chrome, or Mozilla Firefox. My HP Pavilion Desktop has 504 MB of Ram and I am using high speed internet connection. Because it was crashing so much, I used the uninstall program for Flash player to uninstall Flash, I checked my registry and removed anything I saw that was Flash. I then uninstalled Google Chrome and Mozilla Firefox, then I reinstalled the most recent versions from their websites. I did the same for FlashPlayer and Shockwave Flash. I went to the Adobe website and had them check to see if it was working and it shows I have FlashPlayer 10.3.181.36. The page that shows  which version of flash player goes with Windows XP states that I should have 10.3.181.34 (This is what I thought I had before I updated, I was having the same problems). When I went into my computer to see what version I have, it shows 11.5.9.620 Activex and both Flash Player and Flash Player Object is listed as 10.3.181.34. My firewall for Windows is set to medium. I also am running Norton Internet Security. It takes anywhere from 3-6minutes for some of my games to load, and I have to refresh at least 3-4 times in order to play. When I do start to play it freezes frequently and I use escape to free it up. This has been going on for a month. I have no idea what to do. I am not very computer savy and I have been learning as I go.

  • Binding in Prepared Statement is not working with Microsoft SQL Server JDBC

    I ran the following program with sqljdbc4.jar in the class path. There is data in the EMPLOYEE table for the employee name DEMO but the following program is not retrieving data for DEMO. When the same program was run with Merlia.jar in the class path, it was retrieving data for DEMO.
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    Connection con = DriverManager.getConnection("jdbc:sqlserver://SERVER23:5000;databaseName=TESTDB", "SYSADM", "SYSADM");
    String sqlSele = "SELECT * FROM EMPLOYEE WHERE EMPNAME like ?" ;
    PreparedStatement sts = con.prepareStatement(sqlSele);
    sts.setString(1, "DEMO" );
    ResultSet rs = sts.executeQuery();
    while(rs.next())
    System.out.println("driverConn.main()" + rs.toString());
    catch(Exception e)
    System.out.println(e);
    e.printStackTrace();
    Can someone help me out from this issue.

    This is the program that I used for testing the behaviour of prepared statement with sqljdbc4.jar. Also included the code for Merlia.jar.
    import java.sql.*;
    public class driverConn {
         public static void main(String [] a)
              try{
              Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
              //Class.forName("com.inet.tds.TdsDriver");
              Connection con = DriverManager.getConnection("jdbc:sqlserver://SERVER23:5000;databaseName=TESTDB", "SYSADM", "SYSADM");
              //Connection con = DriverManager.getConnection("jdbc:inetdae7a:SERVER23:5000?database=TESTDB", "SYSADM", "SYSADM");
              String sqlSele = "SELECT * FROM EMPLOYEE WHERE EMPNAME like ?" ;
              //String sqlSele = "SELECT * FROM EMPLOYEE WHERE EMPNAME like ‘%DEMO%’”;
              PreparedStatement sts = con.prepareStatement(sqlSele);
              sts.setString(1, "DEMO" );
              //sts.setString(1, "%DEMO%" );          
              java.sql.ResultSet rs = sts.executeQuery();          
              while(rs.next())
                   System.out.println("EMPNAME is " + rs.getString(“EMPNAME”) + “”);                    }
              catch(Exception e)
                   System.out.println(e);
                   e.printStackTrace();
    Following are the specifications:
    Version of the Driver:
    Microsoft JDBC Driver 4.0 for SQL Server CTP3
    Downloaded the driver using the link http://www.microsoft.com/download/en/details.aspx?id=11774
    Java Version:
    Java 1.7.0_02
    Database Version:
    Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64)

  • Calling a REST webservice with pl/sql and parse XML

    Hi
    I hope someone is able to help me with this task. I'm newbie with Oracle APEX, have not developed advanced applications yet. A few days ago I installed one of the package application with customer and order. I want to integrate with online shopping with Rest service using PL / SQL. NETS is a provider of online payment systems.
    http://www.betalingsterminal.no/Netthandel-forside/Teknisk-veiledning/Communication/REST/
    There are four steps you must go through to execute the payment. where it is retunert xml files containing infomation to be used further.
    Step 1 - Register payment
    Webshop Performs Register:
    https://epayment-test.bbs.no/Netaxept/Register.aspx?MerchantId=9999997&token=secret&orderNumber=10011&amount=200&CurrencyCode=NOK
    &redirectUrl=http://webshop/RegisterReply.asp
    Reply from payment provider:
    <? Xml version = "1.0"?>
    <RegisterResponse Xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <TransactionId> B127f98b77f741fca6bb49981ee6e846 </ TransactionId>
    </ Register Response>
    Step 2 - Present Web form to customer
    Webshop's customer submit web form:
    https://epayment-test.bbs.no/Terminal/default.aspx?merchantId=9999997&transactionId=b127f98b77f741fca6bb49981ee6e846
    Step 3 - "Redirect" customer back to merchant
    Payment provider send URL to redirect webshop's customer:
    http://webshop/RegisterReply.asp?transactionId=b127f98b77f741fca6bb49981ee6e846&responseCode=OK
    Step 4 - Process payment
    Webshop Performs Process (AUTH):
    https://epayment-test.bbs.no/Netaxept/Process.aspx?merchantId=9999997&token=&transactionId=b127f98b77f741fca6bb49981ee6e846&operation=AUTH
    Reply from payment provider:
    <? Xml version = "1.0"?>
    <Process Response xmlns: XSi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: xsd = "http://www.w3.org/2001/XMLSchema">
    <Operation> AUTH </ Operation>
    <ResponseCode> OK </ Response Code>
    <AuthorizationId> 064392 </ AuthorizationId>
    <TransactionId> B127f98b77f741fca6bb49981ee6e846 </ TransactionId>
    <ExecutionTime> 2009-12-16T11: 17:54.633125 +01:00 </ ExecutionTime>
    <MerchantId> 9999997 </ MerchantId>
    </ Process Response>
    Webshop Performs Process (CAPTURE)
    https://epayment-test.bbs.no/Netaxept/Process.aspx?merchantId=9999997&token=&transactionId=b127f98b77f741fca6bb49981ee6e846
    &transactionAmount=200&operation=CAPTURE
    Reply from payment provider:
    <? Xml version = "1.0"?>
    <ProcessResponse Xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Operation> CAPTURE </ Operation>
    <ResponseCode> OK </ Response Code>
    <TransactionId> B127f98b77f741fca6bb49981ee6e846 </ TransactionId>
    <ExecutionTime> 2009-12-16T11: 40:57.601875 +01:00 </ ExecutionTime>
    <MerchantId> 9999997 </ MerchantId>
    </ Process Response>
    I really appreciate if anyone can help me with This

    Hi,
    Is there any particular reason you want to call a form through provider API?
    Because when you call a from through
    wwa_api_provider.show_portlet the issue #1 is true (you cannot pass parameteres to a form) and the issue #2 could be resoled by supplying a porltet_record.p_page_url to the current page URL.
    However, there is a form-specific PLSQL APIs to call a form and pass parameters to that from which is describe in our FAQ list:
    http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
    Please see following topics:
    "How do I call a form in insert mode and pass it default values?"
    and
    "How do I call a form and pass it a query condition to be automatically executed?"
    Thanks,
    Dmitry

Maybe you are looking for