SQL-Parameters in BC4J?

Hi
For performance and security reasons it is usually better to use SQL-Parameters (like :1) in SQL-Queries instead of building the SQL-String directly. I'd like to adopt this best practice but stumbled over a problem: BC4J adds Parameters when applying View-Links. Unfortunately I've no control over the Parameter added. See the following example:
Assume you have a View-Object with the following Query:
select NAME from USERS where NAME like :1
:1 is my custom parameter which I'd like to set using method 'setWhereClauseParams'. This view works fine until this view is used as a detail of a view link. In this case BC4J adds his own SQL-Parameter so that the query looks like that:
select NAME from USERS where NAME like :1 and (users.USR_ID = :1)
where the first :1 is my own Parameter and the second :1 is added by BC4J as part of the view link. This certainly does not work.
Can anyone give me a hint how to use SQL-Parameters correctly in BC4J-Views? Is there a "How To"-Document or something like that which explain how to use SQL-Parameters in BC4J?
Any hints are appreciated
Thanks
Frank Brandstetter

This way framework automatically adds the new where clause to the existing one, thus eliminating your issueDoes it? I'm not sure! I just tried it out the following example:
Master ViewObject: GroupsView
Detail ViewObject: UsersView (ViewLink to GroupsView)
  GroupsViewImpl GrpVo = getGroupsView();
  GrpVo.first();
  UsersViewImpl UsrVo = getUsersView();
  UsrVo.setWhereClause("NAME like :1");
  System.out.println("Query=" + UsrVo.getQuery());This code prints:Query=SELECT Users.USR_ID,Users.GRP_ID,Users.NAME FROM USERS Users WHERE (NAME like :1) AND Users.GRP_ID = :1This does not look as if my issue is solved... :(

Similar Messages

  • Logging SQL parameters in Database Adapter??

    Hi there!!
    We'd like to be able to log all the parameters that are used in a SQL operation in Database Adapters. So far, we've been able to log the query with '?' instead of the real parameters. For example: select t.* from tsupcontact t WHERE t.idsupplier = ? AND t.idproject IS NULL AND (t.iduser = ? OR ? IS NULL)
    But we need to be able to see the actual parameters that are passed to the query (we're having some trouble with the database adapters and we need to see what's really going on the database).
    Any ideas? Thanks in advance!!

    You need to edit the the aslbdebug.xml file in ./user_projects/domains/<your domain>. Then go into the weblogic console and change the levels to debug. You will get lots of debugging. Below are the settings in my file.
    <java:sb-debug-logger xmlns:java="java:com.bea.wli.debug">
    <java:alsb-stages-transform-runtime-debug>true</java:alsb-stages-transform-runtime-debug>
    <java:alsb-alert-manager-debug>false</java:alsb-alert-manager-debug>
    <java:alsb-credential-debug>false</java:alsb-credential-debug>
    <java:alsb-jms-reporting-provider-debug>false</java:alsb-jms-reporting-provider-debug>
    <java:alsb-management-credential-debug>false</java:alsb-management-credential-debug>
    <java:alsb-management-dashboard-debug>false</java:alsb-management-dashboard-debug>
    <java:alsb-management-debug>false</java:alsb-management-debug>
    <java:alsb-management-user-mgt-debug>false</java:alsb-management-user-mgt-debug>
    <java:alsb-module-debug>true</java:alsb-module-debug>
    <java:alsb-monitoring-aggregator-debug>false</java:alsb-monitoring-aggregator-debug>
    <java:alsb-monitoring-debug>false</java:alsb-monitoring-debug>
    <java:alsb-pipeline-debug>true</java:alsb-pipeline-debug>
    <java:alsb-security-wss-debug>false</java:alsb-security-wss-debug>
    <java:alsb-service-account-manager-debug>false</java:alsb-service-account-manager-debug>
    <java:alsb-service-provider-manager-debug>false</java:alsb-service-provider-manager-debug>
    <java:alsb-service-repository-debug>false</java:alsb-service-repository-debug>
    <java:alsb-service-security-manager-debug>false</java:alsb-service-security-manager-debug>
    <java:alsb-service-validation-debug>false</java:alsb-service-validation-debug>
    <java:alsb-test-console-debug>true</java:alsb-test-console-debug>
    <java:alsb-transports-debug>true</java:alsb-transports-debug>
    <java:alsb-uddi-debug>true</java:alsb-uddi-debug>
    <java:alsb-wsdl-repository-debug>false</java:alsb-wsdl-repository-debug>
    <java:alsb-wspolicy-repository-debug>false</java:alsb-wspolicy-repository-debug>
    <java:alsb-security-encryption-debug>false</java:alsb-security-encryption-debug>
    <java:alsb-security-module-debug>false</java:alsb-security-module-debug>
    <java:alsb-sources-debug>false</java:alsb-sources-debug>
    <java:alsb-custom-resource-debug>true</java:alsb-custom-resource-debug>
    <java:alsb-mqconnection-debug>false</java:alsb-mqconnection-debug>
    <java:alsb-throttling-debug>false</java:alsb-throttling-debug>
    <java:alsb-flow-resource-debug>false</java:alsb-flow-resource-debug>
    <java:alsb-flow-transport-debug>false</java:alsb-flow-transport-debug>
    <java:alsb-flow-deployment-debug>false</java:alsb-flow-deployment-debug>
    <java:alsb-debugger-debug>true</java:alsb-debugger-debug>
    </java:sb-debug-logger>

  • Passing SQL-Parameters to Oracle-Reports from java

    hello,
    i want to write an application in the following way:
    on a java-frontend an user can select values for different
    parameters. these values should be to transferred to the sql-
    query of the reports rdf file. what is the syntax of an
    parameter passed from java to oracle reports.
    does this work with runtime.exec()... ?
    does anybody have an example.
    any help would be very appreciated.
    greetings
    Thorsten Lorenz

    In order to pass the parameters to report rdf, you can create user parameters in the oracle report builder, hook up the parameters with query. For example, you can create user parameter P_DEPTNO, then create a sql query: select * from dept where deptno = :P_DEPTNO. When you run this report, you give P_DEPTNO=10 as parameter, the rdf will generate report that only prints out department 10's information.
    Once you have this kind of report created, you have several ways to achieve what you want.
    1. use rwrun60. In your java program, you can invoke rwrun60 via runtime.exec(cmd) where cmd = rwrun60 report=dept.rdf userid=scott/tiger@orcl destype=file desformat=pdf desname=dept.pdf p_deptno=<value_from_java_app>
    2. similarly, use rwcli60. the cmd would be:
    cmd = rwcli60 server=repserver report=dept.rdf userid=scott/tiger@orcl destype=file desformat=pdf desname=dept.pdf p_deptno=<value_from_java_app>
    3. use rwcgi60. Instead of using runtime.exec, you should use java URL object to run the report in the web environment.
    option 2 & 3 takes advantage of powerful functionality of reports server, and it is much more scale than option 1.

  • SQL Parameters: Add vs. AddWithValue

    I'm in the process of designing an application (Visual C# 2012) that will be working with a SQL database, and have been using parameters in my queries.
    My question is if there is any advantages/disadvantages to using AddWithValue over Adding the paramater and then specifying the value and type in a separate instruction (in the C# code)?
    I've read a few places that sometimes with AddWithValue, either the .Net framework or SQL doesn't always select the appropriate datatype for the parameter and can cause errors.  But on the other hand, using AddWithValue can reduce the number of lines
    of code you have to write (some of my queries might have 10+ parameters, which is small compared to a database for a multi-site Enterprise database system) and thus make your code faster (hopefully).
    Opinions as to whether to use Add + extra statements, or just use AddWithValue?

    that sometimes with AddWithValue, either the .Net framework or SQL doesn't always select the appropriate datatype for the parameter and can cause errors. 
    It's the other way round, see
    SqlParameterCollection.AddWithValue
    Method => Remarks:
    "AddWithValuereplaces the
    SqlParameterCollection.Add method
    that takes a String and an
    Object. The overload of
    Add that takes a string and an object was deprecated because of possible ambiguity with the
    SqlParameterCollection.Add overload that takes a
    String and a
    SqlDbType enumeration value where passing an integer with the string could be interpreted as being either the parameter value or the corresponding
    SqlDbType value. Use
    AddWithValue whenever you want to add a parameter by specifying its name and value."
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • To JDev Team : SQL generated, Struts, BC4J Admin, ...

    Hi,
    I've followed the Tutorial 'Generating a Struts-based JSP Application for an
    Application Module', where I'm working with only one table.
    When I run the 'main.html', on the left side ( navigator ), there are 'Browse' and 'Query' options.
    Every time I click on 'Browse', I always have this error :
    Error Message: JBO-26044: Error while getting estimated row count for view object TimesheetView1, statement
    SELECT count(1) FROM (SELECT Timesheet.ts_id, Timesheet.ts_user, Timesheet.ts_code, Timesheet.ts_date, Timesheet.ts_hour
    FROM timesheet Timesheet) ESTCOUNT
    My config are :
    * Win2K
    * JAVA_HOME set to j2sdk1.4.1_01
    * mySQL 3.23.49 with JDBC driver mysql-connector-java-2.0.14-bin.jar
    * I use ultraDevHack=true as parameter within the URL
    Even with 'ultraDevHack=true' parameter, the subselect still not working.
    I've seen in the forum that JDev Team have tried with that parameter, and it worked,
    but it didn't mention with which version of mySQL and which JDBC driver.
    I would like to modify the above SQL into a simpler one 'SELECT COUNT(*) FROM timesheet'.
    Anybody know how ?
    The View Object Wizard didn't help me at all for the above SQL.
    In fact I would like to fully controled, modified, or cuztomised all SQL generated.
    Back to main.html, the header contains two buttons 'BC4J Admin' and 'Help'.
    When I click on 'BC4J Admin', I have this :
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java
    error: Invalid class file format in C:\j2sdk1.4.1_01\jre\lib\rt.jar(java/lang/Object.class). The major.minor version '48.0' is too recent for this tool to understand.
    C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java:0: Class java.lang.Object not found in class com.orionserver.http.OrionHttpJspPage.
    package _wm;
    ^
    2 errors
    Why is that ?
    Out of scope, sometimes it's very slow accessing this forum ( 'Connection timed out' or 'The specified network name is no longer available' ...).
    Any of you have the same problem ?
    Is it possible to put some criterias within the Search, i.e. Sort by Date ?
    Any help would be appreciated.

    Hi,
    I've followed the Tutorial 'Generating a Struts-based JSP Application for an
    Application Module', where I'm working with only one table.
    When I run the 'main.html', on the left side ( navigator ), there are 'Browse' and 'Query' options.
    Every time I click on 'Browse', I always have this error :
    Error Message: JBO-26044: Error while getting estimated row count for view object TimesheetView1, statement
    SELECT count(1) FROM (SELECT Timesheet.ts_id, Timesheet.ts_user, Timesheet.ts_code, Timesheet.ts_date, Timesheet.ts_hour
    FROM timesheet Timesheet) ESTCOUNT
    My config are :
    * Win2K
    * JAVA_HOME set to j2sdk1.4.1_01
    * mySQL 3.23.49 with JDBC driver mysql-connector-java-2.0.14-bin.jar
    * I use ultraDevHack=true as parameter within the URL
    Even with 'ultraDevHack=true' parameter, the subselect still not working.
    I've seen in the forum that JDev Team have tried with that parameter, and it worked,
    but it didn't mention with which version of mySQL and which JDBC driver.
    I would like to modify the above SQL into a simpler one 'SELECT COUNT(*) FROM timesheet'.
    Anybody know how ?
    The View Object Wizard didn't help me at all for the above SQL.
    In fact I would like to fully controled, modified, or cuztomised all SQL generated.
    Back to main.html, the header contains two buttons 'BC4J Admin' and 'Help'.
    When I click on 'BC4J Admin', I have this :
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java
    error: Invalid class file format in C:\j2sdk1.4.1_01\jre\lib\rt.jar(java/lang/Object.class). The major.minor version '48.0' is too recent for this tool to understand.
    C:\usr\J2EE\JDEV\system9.0.3.1035\oc4j-config\application-deployments\bc4j\webapp\persistence\_pages\_wm\_bc4j.java:0: Class java.lang.Object not found in class com.orionserver.http.OrionHttpJspPage.
    package _wm;
    ^
    2 errors
    Why is that ?
    Out of scope, sometimes it's very slow accessing this forum ( 'Connection timed out' or 'The specified network name is no longer available' ...).
    Any of you have the same problem ?
    Is it possible to put some criterias within the Search, i.e. Sort by Date ?
    Any help would be appreciated.

  • Log the SQL parameters used by ORM

    Hi Everyone,
    I have read Rupesh's blog post;
    http://www.rupeshk.org/blog/index.php/2009/07/coldfusion-orm-how-to-log-sql/
    and have appropriately changed the log4j setting
    ### Also log the parameter binding to the prepared statements.
    log4j.logger.org.hibernate.type=DEBUG
    But I still do not see the values of query parameters in my log files.
    All I get is the auestion marks;
    09/15 12:35:57 [ajp-bio-8014-exec-3] HIBERNATE DEBUG -
        insert
        into
            audit_log
            (description, created, userID)
        values
    Does anyone have any ideas? And as always - thanks in advance!
    Gavin.
    Message was edited by: GavinBaumanis

    Easy but you need to extract it from Microsoft Generic Report Pack. 
    So.. the procedure is as follows:
    1) You export and unseal Management Pack from your SCOM using
    Boris's OpsgMgr tools (MPViewer
    2.3.3)
    2) Ok you've got unsealed xml, now the tricky part, use
    MpElementsExtract tool, example of usage:
    MPElementsExtract.exe <MP.xml> /ex /destination:<destination>
    That you way you get several folders out of mp:
    DWScripts, DWSubScripts, LinkedReports, ReportResources, Reports
    Take a look into content of first 2, there will be pure sql scripts, and rdl's are in Reports folder :)
    Other way is to just use SQL profiler and catch SQL query while generating report. 
    --- Jeff (Netwrix)

  • Regapp.sql parameters

    I am trying to register APEX as a partner application using regapp.sql command. Where on the AS would I find the values for the following parameters?
    p_site_token
    p_site_id
    p_login_url
    p_encryption_key
    Thanks

    sch5479,
    Have a look at the following link -
    http://www.oracle.com/technology/products/database/application_express/howtos/sso_partner_app.html
    It describes exactly how to setup an Apex application as a partner Application with Oracle SSO

  • Quotes and SQL Stmts in BC4J

    Guys,
    How do I get around this problem in bc4j? All I want is to query a table using a string like "FIXED 1'S"
    Any suggestions?
    Sandro
    2004-03-17 23:22:58,837 ERROR MicroPoller oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT Object.OBJECT_ID, Object.TYPE_DEFINITION_ID, Object.CODE, Object.NAME, Object.DEFAULT_VALUE, Object.SORT_STRING, Object.DETAIL_LINE, Object.CREATED_BY, Object.CREATED_DATE, Object.MODIFIED_BY, Object.MODIFIED_DATE, Object.SEARCH_CODE, Object.SEARCH_NAME, Object.DELETED_BY, Object.DELETED_DATE FROM OBJECT Object WHERE ( ( (Object.TYPE_DEFINITION_ID = 12241) AND (Object.SEARCH_CODE = 'FIXED 1'S') ) )
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:662)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3049)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:539)
         at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:586)
         at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3013)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3000)
         at com.commoss.panda.bc4j2.gen.ObjectViewImpl.applySearchCodeTypeDefinitionID(ObjectViewImpl.java:46)
         at com.commoss.panda.external.sync.CustomFieldsUpdater.findOrCreateCustomField(CustomFieldsUpdater.java:175)
         at com.commoss.panda.external.sync.CustomFieldsUpdater.setCustomFields(CustomFieldsUpdater.java:145)
         at com.commoss.panda.external.sync.CustomFieldsUpdater.<init>(CustomFieldsUpdater.java:95)
         at com.commoss.panda.external.sync.NEUpdater.setCustomFields(NEUpdater.java:538)
         at com.commoss.panda.external.sync.NEUpdater.setAll(NEUpdater.java:509)
         at com.commoss.panda.external.sync.NEUpdater.process(NEUpdater.java:326)
         at com.commoss.panda.external.sync.PandaClassDescription.process(PandaClassDescription.java:279)
         at com.commoss.panda.external.sync.MicroPoller.pollPanda(MicroPoller.java:594)
         at com.commoss.panda.external.sync.MicroPoller.run(MicroPoller.java:411)
    ## Detail 0 ##
    java.sql.SQLException: ORA-00907: missing right parenthesis
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:241)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1477)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:888)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2267)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2525)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:452)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:382)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:594)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3049)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:539)
         at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:586)
         at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3013)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3000)
         at com.commoss.panda.bc4j2.gen.ObjectViewImpl.applySearchCodeTypeDefinitionID(ObjectViewImpl.java:46)
         at com.commoss.panda.external.sync.CustomFieldsUpdater.findOrCreateCustomField(CustomFieldsUpdater.java:175)
         at com.commoss.panda.external.sync.CustomFieldsUpdater.setCustomFields(CustomFieldsUpdater.java:145)
         at com.commoss.panda.external.sync.CustomFieldsUpdater.<init>(CustomFieldsUpdater.java:95)
         at com.commoss.panda.external.sync.NEUpdater.setCustomFields(NEUpdater.java:538)
         at com.commoss.panda.external.sync.NEUpdater.setAll(NEUpdater.java:509)
         at com.commoss.panda.external.sync.NEUpdater.process(NEUpdater.java:326)
         at com.commoss.panda.external.sync.PandaClassDescription.process(PandaClassDescription.java:279)
         at com.commoss.panda.external.sync.MicroPoller.pollPanda(MicroPoller.java:594)
         at com.commoss.panda.external.sync.MicroPoller.run(MicroPoller.java:411)

    Have you tried using two single quotes in place of the single quote?

  • PL/SQL Parameterized Exceptions?

    I develop on the Oracle EBS platform and so I have to develop using multiple general purpose programming languages.  Mainly PL/SQL and Java but we also use Ruby and Korn Shell for example.  One thing I have trouble with in PL/SQL is exception handling.  I would really like to be able to provide additional information in an Exception in PL/SQL but don't know how to do so.  One way would be to define an exception with parameters.  Thus providing some slots to stick information into when raising an exception and then using the information when the exception is caught.  I've used raise_application_error that provides slots for a number and text but that's not really my idea of a good solution to this issue.  I like the Ruby Exception object approach myself that allows you to define the slots yourself via sub-classing an Exception class.  I've used OO PL/SQL successfully in certain solutions and I know it works but there are some serious shortcomings that make OO PL/SQL a bit of a no-mans land in my opinion so I think an Exception class in PL/SQL is probably not the way to go at this point but I could be wrong.  So I thought how about defining exceptions with parameters much like a procedure or function.  Is this coming or are there ways to provide additional information in an exception that you have used successfully?
    Thank you

    I got an error when I compiled your procedure
    SQL> create or replace procedure myexception (v  number) is
      2    v1   emp.empno%type;
      3    begin
      4    select empno into v1 from emp where empno=v;
      5    exception when no_data_found then
      6    dbms_output.put_line('No data found');
      7    Do first thing----
      8    when too_many_rows then
      9    dbms_output.put_line('Too many rows');
    10    Do second thing----
    11    when others then
    12    --Do third thing
    13    end;
    14    .
    15   /
    Warning: Procedure created with compilation errors.
    SQL> sho err
    Errors for PROCEDURE MYEXCEPTION:
    LINE/COL ERROR
    13/3     PLS-00103: Encountered the symbol "END" when expecting one of the
             following:
             begin case declare exit for goto if loop mod null pragma
             raise return select update while with <an identifier>
             <a double-quoted delimited-identifier> <a bind variable> <<
             close current delete fetch lock insert open rollback
             savepoint set sql execute commit forall merge pipe
    SQL> create or replace procedure myexception (v  number) is
      2    v1   emp.empno%type;
      3  begin
      4    select empno into v1 from emp where empno=v;
      5  exception when no_data_found then
      6    dbms_output.put_line('No data found');
      7    Do first thing----
      8  when too_many_rows then
      9    dbms_output.put_line('Too many rows');
    10    Do second thing----
    11  when others then
    12    --Do third thing
    13 dbms_output.put_line(SQLERRM);
    14  end;
    15  /
    Procedure created.
    SQL>

  • Input Elements & PL/SQL Parameters

    I have a FORM open/close HTML block on top...then below the block I have inputs...***THOSE INPUTS ARE NOT TO BE TARGETED TO PARAMETERS ***
    How can one prevent those input from being intepreted as parameter entries W/O removing the name attribute ?
    Thanks
    <form ACTION="wict.accept" METHOD="POST" name="ct_flow" id="CTFlowForm">
    blah..blah...
    </form>
    <input name="day" type="checkbox" checked="checked" onclick="return false">Daily
    <input name="week" type="checkbox" onclick="return false">Weekly

    Dear "50122",
    You may have landed in the wrong forum. If your question is actually about the Oracle HTML DB product, please provide a clear question related to HTML DB and we'll try to help.
    -Scott
    P.S. If you like, you can show your name in this forum instead of a numeric ID by clicking on 'Forum Settings' and setting 'Name visible to others' to Yes.

  • Incomplete record set, Crystal XI, MS SQL stored procedure

    Post Author: stadlock
    CA Forum: Data Connectivity and SQL
    I have a stored procedure written in T-SQL. When I use Query Analyzer to call the stored procedure, all records are returned that I'm expecting. So, the sp would seem to be working properly.  If I copy the code in the sp and run as a query within Query Analyzer it returns all the records.  The sp sorts the records alphabetically by last name, on the server.My Crystal XI report hooks into the sp using a MS SQL Server ODBC driver. I have a cascading record selection that uses prompt parameters. That functions fine, each subsequent prompt only allows for record selection based upon the preceding selection.Here's my problem: the first record selection prompts for a person's last name. It's a drop-down, you click the drop-down, you see a list of names, in alphabetical order (just as the sp creates it).But the list only goes up to S. There are no records for T through Z.  Furthermore, records keep "dropping off" daily.  At first, the selection went all the to names that started with "Su...", now it's back to "Sa...".  I think before long the S' will disappear, too.Remember, the sp executes properly within Query Analyzer and does return all records, A to Z. Just not the Crystal report.  There are somewhat less than 1800 records, total.This was working fine last Friday. I can't imagine what's changed over the weekend.
    I've manually executed the sp several times, even scheduled it run every 10 minutes, I just don't know what else to try.  I've dropped it and re-created it.  I get the same incomplete set of records every time.
    Anyone have any idea what I should look for?
    Thanks!

    Post Author: synapsevampire
    CA Forum: Data Connectivity and SQL
    Parameters are limited to the number of rows they return.
    The solution is a registry setting, check out:
    http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2017238&sliceId=&dialogID=4966384&stateId=1 0 4962685
    -k

  • Error in Testing SQL Query VO

    Hi,
    I have a a VO based on a Database Table 'XXCZ_TEST_V'(View in APPS schema)
    The table(view) present in APPS schema is based on several base Tables in XXCZ schema.
    When I test the Query in the Wizard it shows following error int he "Detailed Screen"
    java.sql.SQLException: Invalid column index: getValidColumnIndex
    While testing the VO output in BC4J tester I get followig error
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: Select * from XXCZ_TEST_V
    Note : The query Select * from XXCZ_TEST_V works fine in SQL client or TOAD.
    How can i correct it?
    Thanks,
    Gowtam.

    Hi Srini,
    I am facing a strange behavior in the wizard.
    When i test the query in the Wizard i get[b] "Query Valid".
    If I open the Edit VO and then click test, still I get "Query Valid".
    but when I click Apply I get an SQL error.
    and BC4J tester also throws an SQL error.
    The query is
    Select * from XXCZ_MODELS_V
    First time It works fine..
    Then If I edit it to select Model_code,Model_name from XXCZ_MODELS_V I get the error.
    And now, again if Edit the query back to Select * from XXCZ_MODELS_V,surprse...again an error..
    I am not able to understand the error..as It executes perfectly fine in SQL client
    Everytime I am deleting the VO and creating again with select * query...
    Should I delete the VO everytie if i want to change the Query
    Thanks,
    Gowtam.

  • Combine and simplify SELECT and UPDATE sql query

    foreach (BidList t in bidList)
    query = "SELECT operator_id, plot_id, status FROM booking " +
    "WHERE status='open' AND postcode='" + _plot + "' AND operator_id='0'" +
    "ORDER BY datetime ASC;" +
    "UPDATE booking SET operator_id='" + t.OperatorId + "', status='allocated' " +
    "WHERE (plot_id=" + t.PlotId + " AND operator_id='0' AND status='open') LIMIT 1;";
    dbObject.InsertBooking(query);
    I am cleaning up my code, and came across the above SQL query. Before I make use of SQL parameters, I wanted to ask if it is possible to combine them, and if so, how?

    Consider making a single long query using ‘;’ as a separator:
        query = "";
        foreach (BidList t in bidList)
            query += "UPDATE . . . ; ";
        dbObject.InsertBooking(query);
    Use StringBuilder for more improvements.

  • Kodo 3.4.1: how to limit # of sql query params when using collection param

    Hi,
    We have a problem when using Kodo 3.4.1 against SQL Server 2005, when we execute query:
              Query query = pm.newQuery( extent, "IdList.contains( this )" );
              query.declareParameters( "Collection IdList" );
              query.declareImports( "import java.util.Collection;" );
              return (List) query.execute( list );
    We got:
    com.microsoft.sqlserver.jdbc.SQLServerException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)
    at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:354)
    at com.solarmetric.jdbc.PoolConnection$PoolPreparedStatement.executeQuery(PoolConnection.java:341)
    at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:352)
    at com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1106)
    at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:352)
    at kodo.jdbc.runtime.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1730)
    at com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:339)
    at kodo.jdbc.sql.Select.execute(Select.java:1581)
    at kodo.jdbc.sql.Select.execute(Select.java:1533)
    at kodo.jdbc.runtime.SelectResultObjectProvider.open(SelectResultObjectProvider.java:102)
    at com.solarmetric.rop.EagerResultList.<init>(EagerResultList.java:22)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:1081)
    at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:836)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:799)
    It seems that there're too many ids in the list, and Kodo didn't limit the # of sql parameters when craft the sql query. Is there a way to ask Kodo to use multiple queries with smaller # of sql parameters instead of using one big sql query?
    Thanks

    Hi,
    Sadly, there is no way to do that in Kodo currently. The closest is the inClauseLimit DBDictionary setting, but that setting just breaks things up into multiple IN statements put together with an OR clause. In your case, it looks like the network transport, not the SQL parser, is complaining about size limits.
    You could force the query to run in-memory, but that would probably be prohibitively slow, unless the data set that you're querying against is relatively small.
    -Patrick

  • SQL generated with column__1 alias

    hi..
    i running a report in webi.
    SELECT
      PUB.unidonem.yil AS Column__1,
      SUM(PUB.unibutcealim.adet),
      Sum(PUB.unibutcealim.tutar)
    GROUP BY
      Column__1
    but i dont want column__1...and i dont know why şs generated??
    any suggestions?
    thanks.
    ( i know the custum sql and its ok.. but not enough for me)

    Hi,
    Ok, so now i understand you are creating a new Measure in the universe, and testing it in webi,
    Here's some background info on your error: http://databases.aspfaq.com/database/what-does-ambiguous-column-name-mean.html
    This typically happens when the Select statement has the same name for more than 1 column. So Alias Names need to be setup to ensure unique column names.
    There are so many factors that could be at play here..  Your investigation is a a good condidate for a Support Message. Please log an OSS via SMP.
    1. Given that this is a Progress DB (generic odbc), you may need some SQL Parameters, or .sbo / .prm file modifications in the DataAccess layer, or some ANSI indetifiers need to be set ..  (Relevant guide is here: http://help.sap.com/businessobject/product_guides/boexir31SP3/en/xi31_sp3_data_acs_en.pdf )
    2. You might also be interested in Note 1265192 - Web Intelligence Objects Causing Split Queries (missing context)
    3. You might also want to check that there aren't Row Level restrictions ontop of your user groups, which may affect SQL generation.
    Apologies I cannot do more at this stage.
    Regards,
    H

Maybe you are looking for

  • How to create a variant for a screen (not a selection screen)

    Hi I foud a function module RS_CREATE_VARIANT. Is this the correct fm for creating screen variant, if yes then pls provide me some help about how to pass values to this fm. if not then pls help me to find out new one. thnks satisfactory answer will b

  • CSS Flexbox - a new layout method for web pages

    Hi, As you may all know, css flexbox is a new layout method for laying out your web page, and with Firefox releasing version 22 within the next few days, (should have been yesterday) it is now no longer hidden behind browser settings. Add to this the

  • External hard drive to be read and write for MAC & PC

    All, I recently bought a Mac Book Pro and have always used a PC until now, which i used an external hard drive to use to copy files to. My mac does not let me write to this hard drive. What do i have to do to be able to read and write to this hard dr

  • Change fpla-rfpln for each item in the user_exit_move_field_to_fpla

    Hi, I used VA41 transaction to create a sale order (auart = u201CXXXXu201D) and i would like assign in the u201Cuser_exit_move_field_to_fplau201D a calendar number (fpla-rfpln) in my sale document, for each items line. But the program is passed on th

  • Google map data not displaying correctly in a spry collapsible panel

    I created a spry collapsible panel into which I've put google map data. The map placed in the collapsible panel looks and functions OK but shows my location in the wrong place. I tested it by putting exactly the same google map elsewhere on my page a