Access stored procedure in runtime

I would like to know how I can access the stored procedure in the runtime and is there any way to call the stored procedure from fx (edit formula button).Otherwise, any suggestion is much appreciated.
Thanks and Regards

Hi All,
Problem is solved after adding files to microsoft access 2000 runtime. runtime missing some DLLs related to sql server 2000 to update those files follow the links below
http://support.microsoft.com/?kbid=287484
http://www.microsoft.com/office/orkarchive/2000ddl.htm#accsql
Thanks,
Brahma

Similar Messages

  • How to debug Stored Procedures on Runtime?

    Is there any way or any tool available using which I could debug stored procedures on runtime ? Please also pass the links if you know any.

    Check out the PL/SQL Developer tool:
    http://www.allroundautomations.nl/plsqldev.html
    You can download a fully functional version for a 30 day trial. Much less expensive than TOAD, and better yet, it actually works (the TOAD PL/SQL debugger in version 8 is so buggy as to render it useless)

  • Sqlexception ,when trying to access stored procedure

              hi
              i have a strange problem, iam using jsp code for accessing stored procedure in sql
              server database, below is my java code which calls stored procedure,
              <%
                   CallableStatement cstmt=null;
                   String sql= "{?= call ascs_submit_prem_adj(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
                   cstmt=con.prepareCall(sql);
                   cstmt.registerOutParameter(1,java.sql.Types.INTEGER);
                   cstmt.registerOutParameter(2,java.sql.Types.INTEGER);
                   cstmt.setObject(3,adjustId);
                   cstmt.setString(4,co_id);
                   cstmt.setString(5,policyNo);
                   cstmt.setString(6,subPolicy);
                   cstmt.setString(7,busDiv);
                   cstmt.setString(8,commAcct);
                   cstmt.setString(9,agentId);
                   cstmt.setString(10,premAmount);
                   cstmt.setString(11,dueDate);
                   cstmt.setString(12,lobCd);
                   cstmt.setString(13,commAmount);
                   cstmt.setString(14,commReason);
                   cstmt.setString(15,recovFlag);
                   cstmt.setString(16,recovPercent);
                   cstmt.setString(17,combId);
                   cstmt.setString(18,payFlag);
                   cstmt.setString(19,combAcct);
                   cstmt.setString(20,combSub);
                   cstmt.setString(21,paidFlag);
                   cstmt.setString(22,changeBy);
                   cstmt.setString(23,transDt);
                   cstmt.execute();
              ERROR LINE-->     adjustId=cstmt.getObject(2).toString();
                   spReturnCode=cstmt.getInt(1);
              %>
              i hv two output parameters,,when i try to get the second output parameter (ie ERROR
              LINE)
              IAM GETTING a strange error, i don't know what it is? this is the error i got
              Tue Feb 13 10:06:26 EST 2001:<E> <ServletContext-General> exception raised on '/
              PremAdjSubmit.jsp'
              java.sql.SQLException: Invalid column number (2). This table has 1 columns (a va
              lid index is 1 trough 1).
              at weblogic.jdbcbase.mssqlserver4.TdsResultSet.getEntry(TdsResultSet.jav
              a, Compiled Code)
              at weblogic.jdbcbase.mssqlserver4.TdsResultSet.getObject(TdsResultSet.ja
              va, Compiled Code)
              at weblogic.jdbcbase.mssqlserver4.TdsStatement.getObject(TdsStatement.ja
              va:2338)
              at jsp_servlet._premadjsubmit._jspService(_premadjsubmit.java, Compiled
              Code)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java, Compiled Code)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              ContextManager.java, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              a, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java, Com
              piled Code)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              detailed error-----------
              Error Found
              Oops! an exception occurred.
              The name of the exception is
              java.sql.SQLException: Invalid column number (2). This table has 1 columns (a valid
              index is 1 trough 1).
              can any one help me out...
              thanks
              san
              

              hi
              i have a strange problem, iam using jsp code for accessing stored procedure in sql
              server database, below is my java code which calls stored procedure,
              <%
                   CallableStatement cstmt=null;
                   String sql= "{?= call ascs_submit_prem_adj(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
                   cstmt=con.prepareCall(sql);
                   cstmt.registerOutParameter(1,java.sql.Types.INTEGER);
                   cstmt.registerOutParameter(2,java.sql.Types.INTEGER);
                   cstmt.setObject(3,adjustId);
                   cstmt.setString(4,co_id);
                   cstmt.setString(5,policyNo);
                   cstmt.setString(6,subPolicy);
                   cstmt.setString(7,busDiv);
                   cstmt.setString(8,commAcct);
                   cstmt.setString(9,agentId);
                   cstmt.setString(10,premAmount);
                   cstmt.setString(11,dueDate);
                   cstmt.setString(12,lobCd);
                   cstmt.setString(13,commAmount);
                   cstmt.setString(14,commReason);
                   cstmt.setString(15,recovFlag);
                   cstmt.setString(16,recovPercent);
                   cstmt.setString(17,combId);
                   cstmt.setString(18,payFlag);
                   cstmt.setString(19,combAcct);
                   cstmt.setString(20,combSub);
                   cstmt.setString(21,paidFlag);
                   cstmt.setString(22,changeBy);
                   cstmt.setString(23,transDt);
                   cstmt.execute();
              ERROR LINE-->     adjustId=cstmt.getObject(2).toString();
                   spReturnCode=cstmt.getInt(1);
              %>
              i hv two output parameters,,when i try to get the second output parameter (ie ERROR
              LINE)
              IAM GETTING a strange error, i don't know what it is? this is the error i got
              Tue Feb 13 10:06:26 EST 2001:<E> <ServletContext-General> exception raised on '/
              PremAdjSubmit.jsp'
              java.sql.SQLException: Invalid column number (2). This table has 1 columns (a va
              lid index is 1 trough 1).
              at weblogic.jdbcbase.mssqlserver4.TdsResultSet.getEntry(TdsResultSet.jav
              a, Compiled Code)
              at weblogic.jdbcbase.mssqlserver4.TdsResultSet.getObject(TdsResultSet.ja
              va, Compiled Code)
              at weblogic.jdbcbase.mssqlserver4.TdsStatement.getObject(TdsStatement.ja
              va:2338)
              at jsp_servlet._premadjsubmit._jspService(_premadjsubmit.java, Compiled
              Code)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java, Compiled Code)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              ContextManager.java, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              a, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java, Com
              piled Code)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              detailed error-----------
              Error Found
              Oops! an exception occurred.
              The name of the exception is
              java.sql.SQLException: Invalid column number (2). This table has 1 columns (a valid
              index is 1 trough 1).
              can any one help me out...
              thanks
              san
              

  • JDBC - CallableStatement - Error in Accessing Stored Procedure of MS SQL

    Dear Friends,
    The following is the code to access a stored procedure of MS SQL Server 7.0 sp4,
              try
                   CallableStatement cstmt;
                   ResultSet rst;
                   cstmt = connection.prepareCall("{call backupdb[?,?]}");
                   cstmt.setString("db_name","SBIREMITLIVE");
                   cstmt.setString("path", "c:\testing.bak");
                   cstmt.executeQuery();
                   System.out.println("Stored Procedure called successfully");
              catch(SQLException se)
                   System.out.println(se.toString());
    when i execute this i am getting the error as " MS ODBC-MS SQL Server Syntax error or Access Violation "
    What's the problem exactly ? anybody came across this issue..if so...kindly help me....
    Here is my MS SQL Server stored procedure.....for reference
    create procedure backupdb(@db_name varchar(40), @path varchar(100)) as
    Backup database @db_name to disk = @path
    Regards,
    V.Prasanna

    Dear DigitalDreamer,
    Yes, as per your suggestion, it's working fine...thanks a lot...
    here is the code...
                   CallableStatement cstmt;
                   ResultSet rst;
                   cstmt = connection.prepareCall(" exec backupdb ?,? ");
                   cstmt.setString(1,"SBIREMITLIVE");
                   cstmt.setString(2, "c:\\testing.bak");
                   cstmt.execute();
    Regards,
    V.Prasanna

  • Passing Parameters in Crystal XI (v1) to SQL or MS Access Stored Procedures

    Post Author: mib
    CA Forum: Crystal Reports
    In Crystal Reports 8.5 I had a report with a parameter called WeekCommencing which was
    a datetime parameter.  This worked against a stored procedure in a SQL
    database and a union query with a parameter within MS Access database
    - my application works on either platforms.
    Now in Crystal XI, Crystal is now looking for a parameter called
    @WeekCommencing which would be the full name in the stored procedure
    but if I rename the parameter the same report would no longer work
    against the MS Access database.
    Anyone have any suggestions?

    Post Author: mib
    CA Forum: Crystal Reports
    In Crystal Reports 8.5 I had a report with a parameter called WeekCommencing which was
    a datetime parameter.  This worked against a stored procedure in a SQL
    database and a union query with a parameter within MS Access database
    - my application works on either platforms.
    Now in Crystal XI, Crystal is now looking for a parameter called
    @WeekCommencing which would be the full name in the stored procedure
    but if I rename the parameter the same report would no longer work
    against the MS Access database.
    Anyone have any suggestions?

  • UCCX 8.5 - Accessing stored procedure result

    Hi,
    I am trying to access a stored procedure through UCCX script.
    I can access a stored procedure by following SQL query through DBRead step and it is successfully getting executed.
    DECLARE         @return_value int,
                            @Result int;
                EXEC        @return_value = [dbo].[SP_ValidateUser]
                                @ContactPersonId =$input1 ,
                                @ContactPersonTypeid = $input2 ,
                                @Result = @Result OUTPUT;
             SELECT        @Result as '@Result'
    I have to get the output of stored procedure in UCCX script variable. Is there any way to get it through DBGet Step.
    Any help regarding this is greatly appreciated.
    Thanks,
    Indumathi.P

    Hi Indumathi,
    Have you got a response to this? I am also looking for a solution to get the output of Stored procedure in my UCCX local script variable. Can you kindly provide me with the script solution?
    Thank you
    Regards
    Jeesh

  • Stored Procedure At Runtime !!!!

    Hi all,
    I want to create a stored procedure or function at run time!!
    Which mean when the user click a button, it will reflect a dynamically created stored procedure or function in the data base.
    But APex processes cannot do that,Can anyone help me??
    thanks & Regards,
    Ola

    Hi Lev,
    The user cannot enter any SQL or PL/SQL , he only can enter Mathematical equations like "a=100+(v*25)/2"
    where a and v are predefined variables, actually it is a dimmed text box and he drag and drop elements into it.
    Then I have to validate this equation before converting it to PL/SQL anonymous block or procedure.
    But my question is if i use anonymous blocks,how can i execute it later on
    for example if we saved the previous equation as 'e1' how can i say "x=e1(10)".
    Regards,
    Ola

  • Compiling a frequently accessed Stored Procedure

    RDBMS version :10.2.0.4.0 in a 2 node RAC
    Our Production DB is 24x7 . Our development team has made a change in a frequently accessed Procedure's code.
    At any given time this Stored proc is accessed by at least 5 sessions.
    I have been asked to compile this Procedure with the new changes.
    Since this is a frequently accessed, i think the only option i've left to compile this proc is to Shutdown the DB and start it up using
    STARTUP RESTRICTand then compile it. But, this procedure is actually run by a DBMS_JOB , so even if i shutdown, when i restart it , the job will resume ie continue executing the stored proc. Right?
    I cannot bring down the local listeners as they are listening for another DB in the cluster.
    Is there any other better way ?

    It's nothing to do with Oracle or any other technology -it's part of defining maintainable service levels.
    Unless you really, really need 24/7 availability, it's always best to give yourself a window of downtime for doing upgrades, maintenance etc. A small bit of planned downtime can help prevent large periods of unplanned!
    If you do need that 100% uptime then it needs to be architected in from the start - define your SLAs then architect an environment that can deliver. Unfortunately it is nearly always done the other way round, based upon what people would like, not necessarly what they need, or what is deliverable.

  • Oracle Stored Procedure call in a Derived Table?

    Can a statement that defines derived table in the Designer contain a call to an Oracle Stored Proc? The proc takes one varchar2 parameter and returns a result set that consists of one field of several records and is currently implemented via sys_refcursor (return type is flexible as long as it allows to pass the result set back)
    Is there any difference between BOXI R2 and R3.0 regarding to the matter?

    Hi there,
    In XI R 3 you can now created a special universe to use stored procedures.A stored procedure universe is a special universe that enables Web Intelligence users to access stored procedures residing in the database. In BusinessObjects XI Release 3, you can use stored procedures with Desktop Intelligence and with universes in Designer. You also benefit from universes that contain stored procedures for Crystal Reports and Web Intelligence.
    XI R 2 no can do.
    Hope this helps
    Jacques

  • [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'dbo.sp_SPNAMEHERE'.

    OK, something seemed to have changed with my system because this error is NEW. It might be related to my system upgrade from Vista to Win7, but just guessing here.
    I run a database on a corporate MS Sql Server (2005) and an ASP application that connects via ODBC. The real world application works fine, however when I attempt to access Stored Procedures from Dreamweaver (on my development machine)  I am getting the following error:
    [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'dbo.sp_SPNAMEHERE'.
    This only seems to happen on Stored procedures that RETURN a recordset.
    system:
    Win7
    Dreamweaver CS4
    Code: VBScript/Classic ASP
    SQL Server 2005
    Connecting via ODBC: MM_MY_STRING = "Driver={SQL Server};Server=wscxxxxxxxxx;Database=dbsystem;Uid=username;Pwd=XXXXXXXXXXXX"
    Stored procedures that do not return a recordset are not an issue.... this has put my development work at a standstill!!
    Thanks in advance!

    Well, I hate bumps, but I am really running out of solutions. I have now tried to use a system DSN on my development machine and that didnt solve the problem. I just un-installed DW and re-installed it and that didnt solve my problem either.
    This is very frustrating, because I cannot use any stored procs that return recordsets... I am stuck... can anybody think of a relatively easy work-around to working in DW w/ recordsets that come from SPs when you cant actually access them?
    The really weird thing is, when I build the command, and choose the stored proc, and give it valid input variables, and TEST it from the TEST button, everything works and data is returned as expected. Once I click "OK" and actually add it to the ASP page the recordset that should be visible isnt... and when I click the plus sign in the bindings window I get the error...
    Help!!

  • Is BC4J a viabl option for database with stored procedure (ref cursor) API?

    I'm about to begin a Web application development project. As foundation, we have a (Oracle) database of certain complexity that have a data access API developed with PL/SQL packages.
    This API is designed to get data through stored procedures/functions that return REF CURSOR.
    Personally I have been investigating about Oracle ADF/JSF, and a number of others J2EE technologies, and at this moment I am doubting if ADF BC are a viable option to my development team.
    I think this because I have noticed that one of the great drawback in ADF BC is the lack of simplicity to get data through stored procedures/functions that returns REF CURSORS.
    I have been looking for documentation and the only thing that I have found are two examples:
    1.- One that really do not work (fails in get data from ref cursor): ADF BC StoredProcedure Sample application.
    2.- And other published by Steve Muench in
    http://radio.weblogs.com/0118231/stories/2003/03/03/gettingAViewObjectsResultRowsFromARefCursor.html. This sample works fine.
    But, the problem with the approach of this last article is the amount (and complexity) of the code necessary to make so basic and recurrent operation as is "obtain data through a stored procedure (ref cursor)".
    Below it is the code that I have constructed to call a function that returns a ref cursor (based on steve's article).
    If this is the only way to make this (historically so basic and simple) task, then it is obvious that BC is not a viable technology to my (or I am in a mistake?), since we have about 50 stored procedures/functions to access the underlying data; that stored procedures/functions are key to development of the new application (and, still more, currently are used to anothers apps ).
    By all this, I would like consult to Oracle's people:
    1.- I really must reject BC as technology to implement this project ?
    2.- It is possible to access stored procedures in a simpler way using BC?
    3.- If the answer to 2 is NOT: in near future, the BC team has plans to give more support to the simple access to stored procedures?
    4.- If the answer to 3 is NOT: what another technology you recommend to construct my data access/business tier and still be able to using the others characteristics of ADF?
    Thank you very much for your guidelines.
    Regards, RL.
    ** And the code!!!
    ** ###   I am forced to do this for each call to a procedure???? ###
    package myrefcursor.model;
    import java.math.BigDecimal;
    import java.sql.CallableStatement;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import java.sql.SQLException;
    import java.sql.Types;
    import oracle.jbo.JboException;
    import oracle.jbo.domain.NullValue;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.DBTransaction;
    import oracle.jbo.server.ViewObjectImpl;
    import oracle.jbo.server.ViewRowImpl;
    import oracle.jbo.server.ViewRowSetImpl;
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    public class TraePolizasViewImpl extends ViewObjectImpl {
        private static final String SQL = "begin ? := PKG_PRUEBA.trae_polizas(?);end;";
        private static final String COUNTSQL = "begin ? := PKG_PRUEBA.count_trae_polizas(?);end;";
        public TraePolizasViewImpl() {
        protected void executeQueryForCollection(Object qc,Object[] params,int numUserParams) {
            BigDecimal rut_contratante = null;
            Object[] theUserParam = null;
            System.out.println(params);
            System.out.println(params[0]);
            if (params != null)
                theUserParam = (Object[]) params[0];
            //if (theUserParam != null && theUserParam.length > 0 )
            if (! (theUserParam[1]   instanceof NullValue) )
                rut_contratante = (BigDecimal)theUserParam[1];
            storeNewResultSet(qc ,retrieveRefCursor(qc, rut_contratante));
            super.executeQueryForCollection(qc, params, numUserParams);
        protected void create() {
          getViewDef().setQuery(null);
          getViewDef().setSelectClause(null);
          setQuery(null);
        protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet rs) {
          rs = getResultSet(qc);
          ViewRowImpl r = createNewRowForCollection(qc);
          try {
            populateAttributeForRow(r,0, nullOrNewNumber(rs.getBigDecimal(1)));
            populateAttributeForRow(r,1, rs.getString(2));
          catch (SQLException s) {
           throw new JboException(s);
          return r;
        protected boolean hasNextForCollection(Object qc) {
          ResultSet rs = getResultSet(qc);
          boolean nextOne = false;
          try {
            nextOne = rs.next();
            if (!nextOne) {
              setFetchCompleteForCollection(qc, true);
              rs.close();
          catch (SQLException s) {
           throw new JboException(s);
          return nextOne;
        protected void releaseUserDataForCollection(Object qc, Object rs) {
           ResultSet userDataRS = getResultSet(qc);
           if (userDataRS != null) {
            try {    userDataRS.close();    }
            catch (SQLException s) { ; }  
          super.releaseUserDataForCollection(qc, rs);
        public long getQueryHitCount(ViewRowSetImpl viewRowSet) {
          return viewRowSet.getRowCount();
        private ResultSet retrieveRefCursor(Object qc, BigDecimal rut_contratante) {
          CallableStatement st = null;
          try {
            st = getDBTransaction().createCallableStatement(SQL, DBTransaction.DEFAULT);
            st.registerOutParameter(1,OracleTypes.CURSOR);
            if (rut_contratante == null)
                st.setNull(2, Types.NUMERIC);
            else
                st.setBigDecimal(2, rut_contratante);
            st.execute();
            ResultSet rs = ((OracleCallableStatement)st).getCursor(1);
            rs.setFetchSize(getFetchSize());
            return rs ;
          catch (SQLException s) {
            throw new JboException(s);
          finally {try {st.close();} catch (SQLException s) {;}}
        private void storeNewResultSet(Object qc, ResultSet rs) {
          ResultSet existingRs = getResultSet(qc);
          if (existingRs != null) {
            try {existingRs.close();} catch (SQLException s) {;}  
          setUserDataForCollection(qc,rs);
          hasNextForCollection(qc); // Prime the pump with the first row.
        private ResultSet getResultSet(Object qc) {
            return (ResultSet)getUserDataForCollection(qc);
        private static Number nullOrNewNumber(BigDecimal b) {
             try {
               return b != null ? new Number(b) : null;
             catch (SQLException s) { ; }
             return null;
        public BigDecimal getprutcontratante() {
            return (BigDecimal)getNamedWhereClauseParam("prutcontratante");
        public void setprutcontratante(BigDecimal value) {
            setNamedWhereClauseParam("prutcontratante", value);
    }

    no?

  • Error connecting to stored procedure in crystal report

    Hello
    I'm using crystal reports 2008 with the latest service pack.
    i'm trying to access stored procedure using the mysql jdbc driver 5.17. The crystal report has been designed which works fine with a login that created the stored procedure but when i try to run with another login that will used to run the crystal reports
    The login has access to execute the stored procedure but entered in the crystal report it complains about
    "User does not have access to metadata required to determine stored procedure parameter types. If rights cannot be granted, configure with {noAccessToProcedureBodies=true} to have driver generate parameters that represent INOUT strings irregardless of actual paramter types"

    Hi Sharon
    Thanks for response.
    I have checked that the user has permission to read and write. When i try and execute the stored procedure in the database by login with the user, it runs fine.
    When i try and call the stored procedure from crystal reports it throws that error message.
    regards
    Naresh

  • Unable to access Custom UDTs returned from a Java Stored Procedure

    Hi,
    I have a UDT in the DB :-
    create type contactrecord as object (
    CN_ID NUMBER(8),
    CN_TITLE VARCHAR2(40),
    CN_FIRST_NAME VARCHAR2(25)
    and this is the corresponding java class ContactDetails.java that maps to this UDT, that I loaded in the Aurora VM.
    package package1;
    mport java.sql.SQLData;
    import java.sql.SQLException;
    import java.sql.SQLInput;
    import java.sql.SQLOutput;
    public class ContactDetails implements SQLData
    private String sql_type;
    private long CN_ID;
    private String CN_TITLE;
    private String CN_FIRST_NAME;
    public String getSQLTypeName() throws SQLException
    return this.sql_type;
    //implementation of readSql
    public void readSQL(SQLInput stream, String typeName) throws SQLException
    sql_type = typeName;
    CN_ID = stream.readLong();
    CN_TITLE = stream.readString();
    CN_FIRST_NAME = stream.readString();
    public void writeSQL(SQLOutput stream) throws SQLException
    stream.writeLong(CN_ID);
    stream.writeString(CN_TITLE);
    stream.writeString(CN_FIRST_NAME);
    //getters and setters for the class vars go here.....
    There is another class A.java that has a java stored procedure/function, which I loaded into the Aurora VM
    Here is the class.
    package package1;
    public class A
    public static ContactDetails returnObject(String name )
         ContactDetails cd = new ContactDetails();
         cd.setCN_ID(1);
    cd.setCN_FIRST_NAME(name);
    return cd;
    Then I declared the call spec for A.returnObject() as
    FUNCTION returnObject(name varchar2) return contactrecord
    AS LANGUAGE JAVA
    NAME 'package1.A.returnObject(java.lang.String) return package1.ContactDetails';
    Then I tried to call the function returnObject through JDBC calls from a class in another VM.
    When I access the object returned by the function, I get a null object.
    Here is the Client code:
    CallableStatement cs = null;
    ResultSet rs = null;
    try
    cs = conn.prepareCall("{ ? = call returnObject(?) }");
    java.util.Map map = conn.getTypeMap();
    map.put("ADMIN.CONTACTRECORD", Class.forName("package1.ContactDetails"));
    conn.setTypeMap(map);
    cs.registerOutParameter(1, OracleTypes.STRUCT, "ADMIN.CONTACTRECORD");
    cs.setString(2, "John Doe" );
    cs.execute();
    ContactDetails cd = (ContactDetails)cs.getObject(1);
    System.out.println("contact first name is:-"+cd.getCN_FIRST_NAME()); //Null Pointer here..cd is null....:(
    if (cs != null) cs.close();
    catch(Exception e)
    e.printStackTrace();
    Although If I try to access the same function from a pl/sql block, I am able
    to access the contactrecord fields.
    What could be wrong ..???
    I could not find any error with the object mapping, as it works perfectly when I interact directly from my VM to the DB,
    without going thru the aurora VM.
    I am using a OCI driver to connect to the DB via JDBC.
    Thanx in advance for any help at all.
    -sk

    Shahid,
    I too have had bad luck in many cases with the automatic translation of Java types to PL/SQL and back. I think the SYS package on the PL/SQL side which handles some of the conversion is DBMS_PICKLER (there are equivalent Java classes which do the same in that world and seem to execute automagically when a conversion is needed). You might want to double-check the data type mappings against the DOC on OTN to make sure they map 1-1. Also make sure the permissions are granted against your objects to whoever is executing them, etc. Very often, I've resorted to passing simple scalar types between the two languages as in some cases the results with complex types are inconsistent.
    Sorry this isn't much help,
    -Dan
    http://www.compuware.com/products/devpartner/db/oracle_debug.htm
    Debug PL/SQL and Java in the Oracle Database

  • How do I retrieve a variable from a stored procedure in Access?

    Given a stored procedure like the one below,
    PROCEDURE getSomething(
                   pVar1           in float,
                   pVar2               in float,
                   pVar3               in float,
                   pVar4               in float,
                   pResults          out varchar2
    How would I retrieve the value in pResults using VBA on Access? Thanks.

    Using this, you can set the value to the session bean
    <c:set property="docID" target="${SessionBean1}" value="${pg_view_doc.hiddenField3.value}"/>
    But before that you have to create a property called docid in the sessionbean1.
    So once the property is set, through getDocID() method u can retrieve the value
    ex: String value=getSessionBean1().getDocID();
    will return the value in the required JSF Page bean

  • Can I create a Stored Procedure That access data from tables of another servers?

    I'm developing a procedure and within it I'm trying to access another server and make a select into a table that belongs to this another server. When I compile this procedure I have this error message: " PLS-00904: insufficient privilege to access object BC.CADPAP", where BC.CADPAP is the problematic table.
    How can I use more than one connection into an Oracle Stored Procedure?
    How I can access tables of a server from a Stored Procedure since the moment I'm already connected with another server?
    Can I create a Stored Procedure That access data from tables of another servers?

    You need to have a Database Link between two servers. Then you could do execute that statement without any problem. Try to create a database link with the help of
    CREATE DATABASE LINK command. Refer Document for further details

Maybe you are looking for

  • Plug-in Error for Acrobat 6 Professional

    Working with Vista on a 2.66Ghz laptop with GB memory. The application fails in one regard.. when navigating to URLs ending in "pdf" e.g. http://www.adobe.com/education/pdf/cib/acro6/acro6_cib_16.pdf the error message: Acrobat Plug-in... could not fi

  • Multiple Email Recepients when using mail pacakging in JAVA AMpping

    Hello Experts,      i am new to the PI and i am trying to implement a file to mail scenario. i am following Stefan Grube's blog (/people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-map

  • How do I save Bridge workspace settings so that screen opens as I want it?

    I use CS3 on Intel iMac.  Recently upgraded to Snow Leopard, but had printer problems and have uninstalled and gone back to Leopard fttb.  Software wiped of course and carelessly I didn't save PS settings.  CS3 now reinstalled. I use Bridge to scroll

  • Need some info to solve

    I want to connect to a different website from my website. At the same time, I want to drop a cookie with some of the key information with it. I want to encrypt too. Any suggestions please.

  • OT: AIX .cshrc

    OT question to those that use C shell on an AIX. I would like to modify my prompt to include the pwd\cwd. How might I do this? I can do it in Solaris but it seems not to work for me in AIX. Below is a snippet from my .cshrc file. set prompt='[\!]% 'T