URGENT !( jdbc query problem)

Hi Forum
i made an application which run on JRun server.
In many of my jsps i used sql query like this:
" select id, name, rollno from student where add = 'jj';"
and retrieve the record from resultset like this:
rs.getString("id");
rs.getString("name");
rs.getString("rollno");
I got no error.
BUT WHEN I RETRIEVE THE RECORDS LIKE THIS
rs.getString("name");
rs.getString("id");
rs.getString("rollno");
i got the error:
java.sql.SQLException: [Oracle][ODBC]Invalid column number <1>.
I can not understand what is the problem ?
all the datatypes are correct.
all coding is correct.
and everything is correct.
pls help me & suggest a solution.
is there any problem of jdbc API OR of JRUN SERVER SETTINGS?
thanks
mail me at [email protected]
Arvind Goel

Here is a part of my code in which i got error:
(all variables are defined)
It is the working code. BUT when i change the sequence of retrieving fields as i select then problem occurs.
pls help me, i need it urgently.
if(st.equals("YES")){
          rs=stmt.executeQuery("select r.na_WPN, m.MK_WPN, m.tp_WPN, m.REC_NO, m.ISSUED, r.dte_del, r.ps from amm_issue r,armentry m where r.ent_srno=m.srno and r.ps='"+username+"' and m.issued='YES' ");
     else if(st.equals("NO")){
                    rs=stmt.executeQuery("select r.na_WPN, m.MK_WPN, m.tp_WPN, m.REC_NO, m.ISSUED, r.dte_del, r.ps from amm_issue r,armentry m where r.ent_srno=m.srno and r.ps='"+username+"' and m.issued='NO' ");
     else if(st.equals("BOTH")){
          rs=stmt.executeQuery("select r.na_WPN, m.MK_WPN, m.tp_WPN, m.REC_NO, m.ISSUED, r.dte_del, r.ps from amm_issue r,armentry m where r.ent_srno=m.srno and r.ps='"+username+"'");
while(rs.next())
     String tp_wpn=rs.getString("na_WPN");
     String mk_wpn=rs.getString("MK_WPN");
     String no_wpn=rs.getString("tp_WPN");
     String rec_no=rs.getString("REC_NO");
     String issued=rs.getString("ISSUED");
     dte_del          =rs.getString("dte_del");
     ps=     rs.getString("ps");
          if(i==0){
          out.println("<tr><th>Police Station </th> <th>Type of Weapon</th><th>Make of Weapon</th><th>No of Weapon</th><th>Recipt No</th><th>Issued Status</th><th>Date of Receiving");
          }i++;
          out.println("<TR><td>"+ps+" <td>"+no_wpn+"      <td>"+mk_wpn+"</td> <td>"+tp_wpn+"</td> <td> "+rec_no+"</td><td>"+issued+"<td><center>"+dte_del+" </td>");
thanx
Arvind

Similar Messages

  • Urgent Sql Query Problem - -Very Urgent

    Hi Guys,
    I need a urgent solution for a problem.I am
    using the following query
    select ename from emp where deptno =10
    Now I will declare a bind variable and if user passes 'A'
    then the query will run as it is and if he passes B
    then it should run the above query with this additional clause -> birthdate - hiredate >15.
    Please can any one help its very urgent

    Assuming that you have a birthdate column in your emp table, the following will do what you are asking for:
    VARIABLE bind_var VARCHAR2(1)
    EXECUTE :bind_var := '&bind_variable'
    SELECT ename FROM
    (SELECT 'A' AS selection, ename FROM emp WHERE deptno = 10
    UNION ALL
    SELECT 'B' AS selection, ename FROM emp WHERE deptno = 10 AND birthdate - hiredate > 15)
    WHERE selection = :bind_var
    However, the clause "birthdate - hiredate > 15" will only retrieve rows for employees who were born more than 15 days after they were hired. I doubt that this is what you really want, since this is impossible.

  • Urgent: InfoSet Query Problem

    Hi:
    I have a question related to the InfoSet issue I have been experiencing.
    I have a SD ODS which has e.g Material, Cal Year/Month and Sales Qty, Sales Amt. I have another ODS which contains BOM (Bill Of Material Data) consists of Material, Components and Qty for each component. I created an InfoSet by using material as join field between this. When I created a query it shows report as shown below.
    Material     Component     Sales Qty      Sales Amt     BOM Qty
    111           AAA              1000          500          50
    111           BBB              1000          500          20
    111           CCC               1000          500          10
    It means It keeps sales Qty for each component so at aggregated level my sales qty and amt is 3000 and 1500 resp. Which is not correct. What can I do in order for Sales Qty & Sales Amt not to repeat. Any help will be appreciated.

    Hi,
    One way to get your correct values is by using formulas for sales quantity ands sales amt:
    sales qty formula = sales qty * BOM Qty / SUM(BOM Qty)
    in this way you will get
    111 AAA 625 312,5 50
    111 BBB 250 125    20
    111 CCC 125 75,5  10
    Cioa
    Joke

  • Jdbc theme query problems

    Hi all,
    I'm integrating Oracle Maps (10) in BISE, I've used Navtweq maps with my spatial data and I've created some maps, themes etc.
    Now I'm trying to create some more complex JDBC themes.
    Everything works fine if I use simple query, but I'm not able to create a theme whit more complex queries
    for example I have 3 tables
    m_admin_area2 (with geometric infos)
    tab_supporto1 (a table with all the sales per day and region)
    I want to know all the regions where my sales are incremented by 10% in a specified arch of time
    this is the query :
    select m_admin_area2.geometry, A.corrente, B.precedente,  ((A.corrente-B.precedente)*100/B.precedente) INCREMENT
    FROM
    m_admin_area2,
      Select m_admin_area2.feature_name, m_admin_area2.carto_id, sum
      (tab_supporto1.tot) as corrente
      from tab_supporto1, m_admin_area2
      where m_admin_area2.carto_id = tab_supporto1.carto_id
      and tab_supporto1.data_ordine <= 20071231
      and tab_supporto1.data_ordine > 20061231
      group by m_admin_area2.carto_id, m_admin_area2.feature_name) A ,
      (Select m_admin_area2.feature_name, m_admin_area2.carto_id, sum
      (tab_supporto1.tot) as precedente
      from tab_supporto1, m_admin_area2
      where m_admin_area2.carto_id = tab_supporto1.carto_id
      and tab_supporto1.data_ordine <= 20061231
      and tab_supporto1.data_ordine > 20051231
      group by m_admin_area2.carto_id, m_admin_area2.feature_name ) B
      WHERE m_admin_area2.carto_id = A.carto_id AND m_admin_area2.carto_id = B.carto_id
      AND ((A.corrente-B.precedente)*100/B.precedente)>10The error returned is:
    Cannot process the following response from FOI server:
    <?xml version="1.0" encoding="UTF-8" ?> <oms_error> [Foi Server] foi process error.:Origine dati di mappa [oms] non trovata (map data source not found).</oms_error>
    Thanks,
    Luca
    Message was edited by:
    LukeBk

    Could the error be similar to this:
    JDBC query error
    Hope this helps,
    Dan Abugov (NAVTEQ)

  • How to use a jdbc query result to redirect to a variable html page

    uh, my problem is that i'm making a servlet which should redirect to a variable html page based on jdbc query (I'm really sorry if this is not the correct forum to post it, but since it's jdbc i thought it was).
    Anyway, the problem is that when a string say, "mystring" is equal to the value in a column, say "column1" of the database then page should redirect to "mystring.html".
    Is this possible, if so then how?
    and if not then is there any other way to solve my problem?
    please, help!!
    thanks in advance.

    uh, since i've already asked man, please gimme an answer if you know, it'll be appreciated.
    OK, HERE'RE THE DETAILS:(as you requested them)
    i have an html page where there's a textfield say "t1", the value of that text field is sent to the servlet which compares the value of the field with the value in Database, say "db1" in column say "column1".
    if there's a value in the column matching the value inputted in the textfield, then i need the servlet to redirect to an html page of the same name as inputted in the textfield. Hope that helps you understand.....
    thanks in advance.......

  • How to call pl/sql stored procedure in JDBC query dialogbox

    Hi,
    how to call pl/sql stored procedure in JDBC query dialogbox(reports 9i) .
    Cheers,
    Raghu

    please refer : Re: problem If you have more doubts, please ask in that question.

  • Query problem(solved)

    hi frs,
    i want to display work_location and office_location in a report.which is in table
    HR_LOCATIONS_ALL
    Which has two location_id
    work location : location_id from per_all_assignments_f &
    office location: location_id from hr_all_organization_units
    how to get both i a have attached the query what i have created but not getting correct values
    Thanks
    Rajesh
    Message was edited by:
    Rajesh.mani
    Message was edited by:
    Rajesh.mani

    What Sarma is basically implying is that we do not care if your problem is an urgent one.. as we, the forum, do not get paid to solve problems here. Forum members assist people in their free time. So why should we care if your problem is urgent? You are in no position to demand a quick response from us.
    Also, by saying that your problem is urgent, you are also saying that other people who have posted problems here, have less urgent and important problems than you. That you and your problem are special and more important than anyone else in this forum.
    Neither of these are acceptable - which is why using the word "urgent" in a posting to a public forum staffed by volunteers, is not acceptable.

  • JDBC query in the course of a separate EJB transaction

    Hi all,
    I am implementing a web application that let user upload file and send it to the backend for processing,which involves EJB level transaction(many read+write operations),say transaction L .The processing time may last for 10 minutes. Meanwhile the user can view the history of the files he uploaded and CURRENT STATUS of the file he submitted for processing,we call it file upload history summary (they are from direct JDBC query to the upload history table,say table U in the database,since they are read only data).
    My problem is: the user can not see his LATEST file upload status UNTIL the backend processing transaction is completed,although the row for latest file he just submits in Table U was created during the course of the transaction L by an EntityBean UEJB.
    I am using Jboss server,do u guys have any idea so that I can see the new file status once it's created by the UEJB even before the transaction L is completed?Thanks

    You can achieve this by using JMS and MDB. Because once your file is uploaded, the server is busy in loading the data to the database. So it is not sending you back the response as you are doing a synchronous communication. You have to use Asynchronuous communication to achieve this. This way the client will not wait for the response and the transaction to finish.
    While uploading you a send the file as a message object using JMS and MDB. Let the MDB call the other EJB to load the data to the database. Then you can refresh the status browser automatically in certain periods to retrieve data using other EJB like simple access. The browser will automatically submit itself and get the data from EJB while the other EJB uploading the data to the database.
    Hope this helps. If you are still not clear write again. I will explain it again.
    Thanks
    Amit

  • JDBC query hangs server

    I have a very weird case when a particular JDBC query kills weblogic server. Attached
    is a thread dump. What's weird is:
    1. There is only one client on the system, and I sware the client sends only one
    request. At the same time there are 12 threads trying to execute the same query.
    2. The query is at the start of thread dump and it takes ~9sec to execute on our
    DB from SQL+. It returns ~300 records. If I change parameters it will be executed
    fine. Each time a client wants to execute a query before it is executed it is
    dumped to log, and there is only one query per all threads in the dump.
    3. Looking into DB log there is no sight of the query that is dumped into log
    file. DB does not have a clue... Both DB and WLS are waiting for each other...
    Environment:
    6.1sp2 on solaris
    Oracle 8.1.7
    JDBC driver from Oracle 9i
    [x.txt]

    There were two problems: request got hanging in the database (original) with proxy
    timing out and making situation worse (sending more requests). 9.2.0.1 did not
    have the original problem (statement did not hang), but the price was too high
    (data corruption) :( Also the problem was very touchy - we got only two environments
    which were duplicating it. This last mail was more on the whining side - hope
    that someone seen something similar and can say a-ha! So I guess I'm back in slow
    and painful try to reproduce and then fix mode... Most likely it all will end
    up with SQL tuning, not app level solution...
    "Slava Imeshev" <[email protected]> wrote:
    Mike,
    AFAIR the poblem was not in the driver but in the load balancer
    resubmitting requests. Could you please try to use 9.0.1 driver.
    Regards,
    Slava Imeshev
    "mike" <[email protected]> wrote in message
    news:[email protected]...
    Unfortunately the story is not completely over.
    We found that the new driver in some cases garbles the data. That happenson updates
    when WLS is changing object and the first parameter in the updatestatement is
    string. Sounds weird, so here more details:
    - We found that some strings in the database are garbled.
    - JDBC trace brought us to update statements. It looks like for eachupdate container
    creates prepared statement and sets parameters on it.
    - If the first parameter is a string then it will be garbled (happenswith
    two
    independant objects).
    The problem is defenitely driver-specific. It does not show up withany
    driver
    but 9.2.0.1. All previous drivers work right, but 9.0.1 that we usedbefore had
    the problem described in the thread, and 8.x work at least 10 timesslower
    (no
    kidding).
    Test app which connects to the same oracle instance and executes thestatement
    from JDBC log works fine (sure it does). Adding nls_charset to classpathdoes
    not make any difference. Attempt to create statement from within WLSwas
    not taken.
    Solution was even more bizzare. Since it was happening only when thefirst
    attribute
    was string we shuffled attributes and the problem went away. But Ido not
    believe
    that is a solution - IMHO that just masks the problem.
    Any and all brignt and not-so-much ideas are welcome.

  • Running Web Layout Of JDBC Query in Oracle Report Builder 11g.

    javax.servlet.jsp.JspException: REP-4100: An attempt to execute data source failed. JDBCPDS-62008:A SQL error occurred: {0}. S1000 [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
    javax.servlet.jsp.JspException: REP-4100: An attempt to execute data source failed.
    JDBCPDS-62008:A SQL error occurred: {0}.
    S1000 [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
         at oracle.reports.jsp.ForEachTag.doStartTag(ForEachTag.java:407)
         at jsp_servlet.__module1000802592._jspService(__module1000802592.java:191)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:417)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:326)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    For the more clarification, I have used JDBC Query as Data source type and Database connected via ODBC Driver in System DSN. The Driver selected from the drop-downs are jdbc-odbc.
    Kindly explain the mistake I m doing.

  • JDBC query theme in a JSP page

    Hi, everyone
    I tried to write JDBC query theme in a JSP page at MapViewer, but it did not work.
    The following is the codes.
    1.JDBC theme in a map request in XML
    <theme name="jdbc_theme_contour">
    <jdbc_query
    datasource="spatial10g"
    jdbc_srid="8703"
    spatial_column="geom"
    render_style="C.RED">
    Select geom from contour where time='01-JUL-07'
    </jdbc_query>
    </theme>
    2. JDBC theme in a JSP request.
    "<theme name=\"jdbc_theme_contour\" >\n" +
    " <jdbc_query \n" +
    " jdbc_srid=\"" + srid + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    " spatial_column=\" geom \"\n" +
    " render_style=\"C.RED\" >\n" +
    " SELECT geom from contour where time='01-JUL-07' \n" +
    " </jdbc_query> \n" +
    " </theme> \n" +
    I do not know whether the second form is right or not. I did not display the JDBC query in MapViewer. Does anyone know the second form is right? or Maybe give me a right form in a JSP request. (contour is a table , geom is the column of geometry attribute in contour)
    Gengsheng

    Hi
    Here is the map request in JSP
    // Construct a map request
    mapRequest = "xml_request=" +
    "<?xml version=\"1.0\" standalone=\"yes\" ?>\n" +
    "<map_request \n" +
    // " title=\"" + title + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    " basemap=\"" + basemap + "\"\n" +
    " width=\"" + width + "\"\n" +
    " height=\"" + height + "\"\n" +
    " bgcolor=\"#FFFFFF\" >\n" +
    " format=\"PNG_URL\" >\n" +
    " <center size=\"" + size + "\">\n" +
    " <geoFeature>\n" +
    " <geometricProperty typeName=\"center\">\n" +
    " <Point>\n" +
    " <coordinates>\n" +
    " " + cx + ", " + cy + "\n" +
    " </coordinates>\n" +
    " </Point>\n" +
    " </geometricProperty>\n" +
    " </geoFeature>\n" +
    " </center>\n" +
    "<themes> \n" +
    (flood.equals("true")?
    ("<theme name=\"jdbc_theme_contour\" >\n" +
    " <jdbc_query \n" +
    " jdbc_srid=\"" + srid + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    " spatial_column=\"GEOM\"\n" +
    " render_style=\"C.RED\" >\n" +
    " SELECT * from contour where time='01-JUL-07' \n" +
    " </jdbc_query> \n" +
         " </theme> \n") : "") +
         (waterdepth.equals("true")?
         (" <theme name=\"FLOOD.LINKS\" >\n" +
         " </theme> \n") : "") +
         " <theme name=\"net_theme\" user_clickable=\"false\"> \n" +
    " <jdbc_network_query \n" +
    " network_name=\"" + networkName + "\"\n" +
    " network_level=\"1\" \n" +
    " jdbc_srid=\"" + srid + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    (showlinks.equals("true")?
    (" link_style=\"L.CRM_SROADS\"\n") : "") +
    (showlinks.equals("true") && showdir.equals("true")?
    (" direction_style=\"M.IMAGE105_BW\"\n" +
    " direction_position=\"0.75\"\n" +
    " direction_markersize=\"" + dirsize + "\"\n") : "") +
    (showlinks.equals("true") && showlklabels.equals("true")?
    (" link_labelstyle=\"" + lklbstyle + "\"\n" +
    " link_labelcolumn=\"link_id\"\n") : "") +
    (shownodes.equals("true") ?
    (" node_style=\"M.CITY HALL 4\"\n" +
    " node_markersize=\"" + nodesize + "\"\n") : "") +
    (shownodes.equals("true") && showndlabels.equals("true")?
    (" node_labelstyle=\"" + ndlbstyle + "\"\n" +
    " node_labelcolumn=\"" + ndlbcolumn + "\"\n") : "") +
    (showpath.equals("true") ?
    (" path_ids=\"" + pathid + "\"\n" +
    " path_styles=\"L.PH\"\n") : "") +
    " asis=\"false\"></jdbc_network_query> \n" +
    " </theme> \n" +
    (runanalysis.equals("true") &&
    (algorithm.equals("DIJKSTRA") || algorithm.equals("ASEARCH")) ?
    (" <theme name=\"spath_theme\" user_clickable=\"false\"> \n" +
    " <jdbc_network_query \n" +
    " network_name=\"" + networkName + "\"\n" +
    " network_level=\"1\" \n" +
    " jdbc_srid=\"" + srid + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    " analysis_algorithm=\"" + algorithm + "\"\n" +
    " shortestpath_style=\"L.DPH\"\n" +
    " shortestpath_startnode=\"" + startnode + "\"\n" +
    " shortestpath_endnode=\"" + endnode + "\"\n" +
    " shortestpath_startstyle=\"M.STAR\"\n" +
    " shortestpath_endstyle=\"M.CIRCLE\"\n" +
    " asis=\"false\"></jdbc_network_query> \n" +
    " </theme> \n") : "") +
    "</themes>\n" +
    "</map_request>\n";
    in this request, other themes and JDBC network query theme work except the JDBC query theme. I guess the style or format in the following are not right.
    " spatial_column=\" geom \"\n" +
    " SELECT geom from contour where time='01-JUL-07' \n" +
    Anyway, I hope you can give me instructions.
    Gengsheng

  • JDBC query against Sybase through jConnect5.5 in Oracle 9i Reports Builder

    Hi There,
    I am trying to connect to Sybase using JDBC query using jConnect55 driver.
    I am not able to do so. I get an error:
    ERR 62002: Failed to connect to the datasource JZ0D5 JZ0D5: Error loading protocol com.sybase.jdbc2//255.255.255.255//255.255.255.255
    Driver entry in my jdbcpds.conf file is
    <driver name ="jConnect55"
    subProtocol ="sybase"
    connectString ="mainProtocol:subProtocol://databaseName"
    class = "com.sybase.jdbc2.jdbc.SybDriver"
    connection = "oracle.reports.plugin.datasource.jdbcpds.JDBCConnectionHandling" loginTimeout = "0">
    <property name="DatabaseName" value="tempdb"/>
    </driver>
    The entry I make in jdbc query connection dialog box is as under:
    User Name:test
    password:secret
    Databse: 255.255.255.255:9999/tempdb
    Driver Type: jConnect55
    Can you point me where I am wrong?
    Thanks in advance
    Ketan Patel

    Hi Sachin,
    I too, got through the issue. Sorry am bit late in updating you. But still I would say it is not on consistent(my feedback as per I grabbed from the behavior. Say, I accepted the query in a particular order of WHERE clause, then If I change the order it will throw an error message saying "Incorrect syntax".)
    Anyway working fine. Thanks for your immediate response with useful hints.
    Rgds
    Anand
    Hi Anand,
    Yes, JDBCPDS accepts all Select queries which follows SQL Specification.
    It would be a valid query as per the database used.
    Please try again, Bind parameters can be placed in any or all of the conditions of SQL Query in JDBCPDS.
    I am able to use them in both the cases you told.
    With Regards
    Reports team

  • JDBC Query using PL/SQL

    I have gotten this to work in my Reports class but can not get this to work at my company. Basically I'm trying to use the JDBC query in Report Builder.
    Here is my Ref Cursor Code:
    CREATE OR REPLACE PACKAGE SCOTT.types is
    type sqlcur is REF cursor;
    end;
    Here is my Pl/SQL function:
    CREATE OR REPLACE FUNCTION SCOTT.test return Scott.types.sqlcur is
    c1 Scott.types.sqlcur;
    begin
    open c1 for select * from scott.emp;
    return c1;
    end;
    I can get this to work in SQL Plus by doing the following:
    var r refcursor
    exec :r := test;
    print r When I go into Reports Builder->JDBC query I connect to the SCOTT db using tiger as the password. I type in the function name TEST and get the error "wrong number or types of arguments in call TEST". I have tried "call TEST" but that doesnt work either. If I use "call TEST" I get an error saying it expected characters ":=(@" etc....
    I know my connection works because I can do a "select * from emp" and get results. Can anyone get this to work?
    I'm running Report Builder 9.0.2.0.3
    I have done multiple searches on this issue and most responses point someone to links that dont work or documentation. I have read them and my code above should work but doesnt........Please put some real examples or code that works with the "Scott" schema.
    Thanks

    hi Shawn
    When running jdbc quesry based on SP with Oracle DB, the first parameter of the store procedure should be of ref cursor type and it shall be a OUT parameter.
    For example:
    CREATE OR REPLACE PACKAGE jdbcpdspkg AS
    TYPE Empcur IS ref cursor ;
    procedure proc_with_param      (p_emp_cv out jdbcpdspkg .empcur, p1 in number, p2 in number , p3 in number, p4 in number , p5 in number) ;
    Thanks
    Rohit

  • Designing LOV Query Problem

    Hello APEX people,
    I posted my problem here:
    Designing LOV Query Problem
    What I have is a sequence like this:
    CREATE SEQUENCE
    DR_SEQ_FIRST_SCHEDULE_GROUP
    MINVALUE 1 MAXVALUE 7 INCREMENT BY 1 START WITH 1
    CACHE 6 ORDER CYCLE ;
    What I need would be a SQL query returning all possible values oft my sequence like:
    1
    2
    3
    4
    5
    6
    7
    I want to use it as a source for a LOV...
    The reason why I use the cycling sequence is: My app uses it to cycle scheduling priorities every month to groups identified by this number (1-7).
    In the Admin Form, I want to restrict the assignment in a user friendly way - a LOV.
    Thanks
    Johann

    Here ist the solution (posted by michales in the PL/SQL forum):
    SQL> CREATE SEQUENCE
    dr_seq_first_schedule_group
    MINVALUE 1 MAXVALUE 7 INCREMENT BY 1 START WITH 1
    CACHE 6 ORDER CYCLE
    Sequence created.
    SQL> SELECT LEVEL sn
    FROM DUAL
    CONNECT BY LEVEL <= (SELECT max_value
    FROM user_sequences
    WHERE sequence_name = 'DR_SEQ_FIRST_SCHEDULE_GROUP')
    SN
    1
    2
    3
    4
    5
    6
    7
    7 rows selected.

  • JDBC Query Single Row service Parse Query

    Using JDBC Query Single Row service on an Oracle database,
    I specify a SQL statement like this:
    select abc, to_char(aDate, 'MM/DD/YYYY') from xyz where def = 123
    then I click the "Parse Query" button to try to map the query results to my variables, but the mapping window gives me 3 fields instead of 2:
    1. abc
    2. to_char(aDate)
    3. 'MM/DD/YYYY'
    how do I let it understand that there are only 2 fields in the results so that I can map it properly?
    thanks

    Got a new minor issue unrelated to the above, but I don't want to flood this forum with another new topic, so I'll stick this new thing here.
    I have a very simple process that only contains this JDBC Query Single Row service.
    In this query single row service, at the bottom of the property sheet, there's a section where it says "number of rows retrieved"...
    now, if I map this 'number of rows' to a variable (I set the variable's type as "int"), when I call my process (as a web service), it returns me nothing... all the output parameters are empty.
    If I remove the mapping of "number of rows", that is, there's nothing in that bottom section. Then my process works correctly, all the output variables contain correct data from my database.
    Has anybody encountered this? what's your solution please?

Maybe you are looking for