Using "?" in SQL sataements with LIKE in EJBs

The sql statement of a finder methode of an entity Bean
should look like this:
SELECT id FROM books WHERE titles LIKE 'abc%'
where abc is the overgiven methode parameter.
To do this I tried to enter the following statement in deploment tool:
SELECT id FROM books WHERE titles LIKE '\?%' {escape '\'}
But because ? is inside of ' ' the server can not interprate it as a parameter sign!!! and the server throws an Exception : too few or too much parameters
I have also tried deverse other combination but without any success

Sorry the query posted by me will not work.
Build the query like
String query = "select id from books where title like ?";
There is no need for single quotes for strings if you are using prepared statement. singe quotes are used only when u not using PreparedStatement.
Do not put any single quotes around the ?.
and append the % to the variable name when you set the parameter on the prepared statement.Then it should work withour problems.
sorry for the inconvenience.
regards,
Abhishek.

Similar Messages

  • Trying to install WSUS role on Windows Server 2012 R2 using dedicated SQL Instance with static port on remote SQL Server 2012 SP1 CU7 on Windows Server 2012 R2.

    I am trying to install WSUS role on Windows Server 2012 R2 using dedicated SQL Instance with static port on remote SQL Server 2012 SP1 CU7 on Windows Server 2012 R2.
    It verifies the connection and then throws the error:
    The request to add or remove features on the specified server failed. The operation cannot be completed, because the server you specified requires a restart.
    WSUS Server : Windows Server 2012 R2
    Remote SQL Server: 2012 SP1 CU7 hosted on Windows Server 2012 R2
    Please let me know if anyone has experienced this issue.

    We were trying to install WSUS role on Windows Server 2012 R2 using dedicated SQL Instance with static port on remote SQL Server 2012 SP1 CU7 on Windows Server 2012 R2.
    It verifies the connection and then throws the error:
    The request to add or remove features on the specified server failed. The operation cannot be completed, because the server you specified requires a restart.
    Same error even after rebooting the server multiple times.
    WSUS Server : Windows Server Standard2012 R2
    Remote SQL Server: Windows Server 2012 SP1 CU7 hosted on Windows Server 2012 R2
    Event ID 7000:
    The Windows Internal Database service failed to start due to the following error:
    The service did not start due to a logon failure.
    Event ID 7041
    The MSSQL$MICROSOFT##WID service was unable to log on as NT SERVICE\MSSQL$MICROSOFT##WID with the currently configured password due to the following error:
    Logon failure: the user has not been granted the requested logon type at this computer.
    Service: MSSQL$MICROSOFT##WID
    Domain and account: NT SERVICE\MSSQL$MICROSOFT##WID
    This service account does not have the required user right "Log on as a service."
    User Action
    Assign "Log on as a service" to the service account on this computer. You can use Local Security Settings (Secpol.msc) to do this. If this computer is a node in a cluster, check that this user
    right is assigned to the Cluster service account on all nodes in the cluster.
    If you have already assigned this user right to the service account, and the user right appears to be removed, check with your domain administrator to find out if a Group Policy object associated
    with this node might be removing the right.
    I found following article:
    "MSSQL$MICROSOFT##WID service was unable to log on as NT SERVICE\MSSQL$MICROSOFT##WID" error when you install WID in Windows Server 2012
    http://support.microsoft.com/kb/2832204/en-us
    To work around the issue, use one of the following methods:
    Assign the Log on as a service user right to NT SERVICE\ALL SERVICES in the GPO that defines the user right.
    Exclude the computer from the GPO that defines the user right.
    We moved the SCCM server to OU where no policies were getting applied and then applied the new GPO to that OU. Restarted the server and we were able to install WSUS role.
    Regards
    PR

  • Can't use ";" in sql clause with Oracle 8.X

    Can't use ";" in sql clause with Oracle 8.X
    I can't use ";" at the ending of sql clause in VB program. First this program can use with Oracle 7.3.4 database. But now i need to upgrade DB to Oracle 8.1.7 ,program can't operate. It show error Runtime 40002
    and 37000:ODBC driver for oracle/invalid charactor
    Thankyou

    I've seen a lot of discussion about semicolons in SQL
    sent from 3rd party applications. A web search should
    bring up the discussions.
    Also you might get more response if you ask this question
    somewhere else. This is not a VB forum, so you may
    not reach relevant people.
    -- CJ

  • SQL error with LIKE clause in statement

    Can anyone explain how an SQL statement with a LIKE clause is executed properly?
    Seems like it ought to be cut and dried, no pun intended!
    When I run the following and set the requestor name = ?, and correctly type in the entire name, a result set (albeit abbreviated) will return.
    But if I try to set the request param to LIKE I get an error of some kind, either invalid cursor state or NullPointer exception.
    Here's my code.
    Statement selstmt = connection.createStatement();          
    String preparedQuery = "SELECT DISTINCT AID, ACTIVE, REQUESTOR_NAME,REQUESTOR_EMAIL" +
    " FROM CHANGE_CONTROL_USER, CHANGE_CONTROL_ADMIN " +
    " WHERE REQUESTOR_NAME LIKE '%?%';";
      String reqName = request.getParameter("requestor_name");
    PreparedStatement prepstmt = connection.prepareStatement(preparedQuery);
    prepstmt.setString(1, reqName);
    ResultSet rslts = prepstmt.executeQuery();
    rslts.next();
    int aidn = rslts.getInt(1);          
    int actbox = rslts.getInt(2);      
    String reqname = rslts.getString(3);
    String reqemails = rslts.getString(4);It's also returning only 1 record for some reason, as I have the following:
    <% while (rslts.next()) { %>
      <tr class="style17">
        <td><%=reqname%></td>
    <td><%=reqemails%></td>
       <td><%=actbox %></td>
        <td><%=aidn %></td>
      </tr>
      <%
    rslts.close();
    selstmt.close();
    %>If I use
    " FROM CHANGE_CONTROL_USER, CHANGE_CONTROL_ADMIN " +
    " WHERE REQUESTOR_NAME = ?;";it will actually spit out the name and corresponding email properly, albeit just one record like I said.
    Is there some kind of escape sequence I should be using that I'm not?
    And why just the one record?
    Any help or direction is appreciated!
    Thanks.

    I have working code for LIKE in PreparedStatement, and its equivalent in your case is something like this:Statement selstmt = connection.createStatement();          
    String preparedQuery = "SELECT DISTINCT AID, ACTIVE, REQUESTOR_NAME,REQUESTOR_EMAIL" +
    " FROM CHANGE_CONTROL_USER, CHANGE_CONTROL_ADMIN " +
    " WHERE REQUESTOR_NAME LIKE ?";
      String reqName = request.getParameter("requestor_name");
    PreparedStatement prepstmt = connection.prepareStatement(preparedQuery);
    prepstmt.setString(1, "%" + reqName.trim() + "%");
    ResultSet rslts = prepstmt.executeQuery();
    rslts.next();
    int aidn = rslts.getInt(1);          
    int actbox = rslts.getInt(2);      
    String reqname = rslts.getString(3);
    String reqemails = rslts.getString(4);

  • SQLEception using Complex SQL Query with Java Studio Creator2 Build(060120)

    I am evaluating Java Studio Creator2 for a WEB base application project that will be making SQL queries to an Oracle Database but I have stumble into a problem using complex SQL queries.
    I am getting an SQLException "org.apache.jasper.JasperException: java.lang.RuntimeException: java.sql.SQLException: [sunm][Oracle JDBC Driver][Oracle]ORA-00923: FROM keyword not found where expected". I looks like it cut my sql.
    The SQL that I am trying to execute is
    Select part_name
    from table1, table2
    where table1.part_nbr = table2.part_nbr
    and table2.row_add_dt = (select max(table3.row_add_dt)
    from table3
    where table3.ser_part_id =table2.ser_part_id)
    This is a valid query that it is using 2 different selects to get a part number.
    If posible, point me to the best solution were I will be able to make complex SQL queries like the one above and bigger.
    Is there any way that I can read an SQL query file instead of inserting the SQL query string into the setCommand()?

    I have read that document looking for some anwsers on how to make this kind of query. If I try the query that I have above in the query editor ,the query editor will cut off from the last select that is between ().
    I beleave, there is a work around using the inner joint or outter join command. I will try them to see If I get the corrent result. If not, then I have to keep on asking for possible solutions.
    Anyway, someone in the Creator Team should take a note in adding something like a special criteria in the Add Query Criteria Box for cases like the one I have. The special criteria will be like using another select/from/where to get some result that will be compare.
    Girish, Are you in the Sun Creator Team?

  • Trouble using MS SQL Server with CMP EJBs

    Hi all,
    I have an application which uses CMP EJBs. I am migrating it from a DB2 backend (where it works like a dream) to a SQL Server 2000 backend. I am using WebSphere 5.0 and I am able to launch the application on the test server without problems, but when I run the EJB test client and try to create any of the EJBs, I get a mass of exceptions - the most pertinent part of which seems to be:
    Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/msissuetracker, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA8100E: Unable to get a PooledConnection from the DataSource.
    Why am I unable to get a PooledConnection? I am using the JDBC driver which I downloaded from the MS website, and the doco says it supports connection pooling. I am very unfamiliar with SQLServer, so can anyone tell me if I'm missing something here??
    Help much appreciated! Cheers, Ben.

    Problem is now sorted. A bit embarassing really. It was a permissions issue. Nothing about permission or access denied was mentioned anywhere in the few hundred lines of exceptions. A more descriptive exception message would have been helpful instead of "Unable to get a PooledConnection from the DataSource". Yes! But WHY?

  • How to use PL/SQL procs with portlet enabled CA's?

    I have written some PL/SQL procedures in a package.
    Now I would like to use this in a FOLDER-portlet (a new CA created for this purpose).
    But when I select the 'Open Item In Folder' (which should show the PL/SQL procedure results in the portlet I hope) I get:
    Call to utl_http failed (WWS-32136)
    ORA-1: User-Defined Exception (WWC-36000)
    If instead the option 'Open in new browser window' (or something like that) I get no error.
    My CA calls the PL/SQL pkg using a URL item like this:
    http://myserver/pls/dad/schema.package.procedure?p_arg=...
    It works entered directly in the address bar and if the item opens in a new window.
    But I want it to display in the SAME portlet as the link I click on.
    How is this done?
    null

    JDBC (and SQLJ) only support SQL types as stored procedure arguments, not PL/SQL types.
    If your stored procedure uses a PL/SQL-only type, such as BOOLEAN, record types, or index-by tables, then you cannot call it from Java (or, for that matter, from other languages as well).
    There is one exception: scalar index-by table arguments have been supported since JDBC 8.1.7 in the JDBC-OCI driver (refer to the JDBC manual for specifics).
    One workaround is to create wrapper PL/SQL stored procedures that take SQL arguments and convert them to PL/SQL -and vice versa- and call the original PL/SQL stored procedures. For example, a record type could be exploded into individual arguments, or it could be converted into a SQL object type, index-by tables could be represented as SQL collection types, etc.
    You can find a small example of this in the back of the JPublisher manual, where an example is given how to call a PL/SQL stored procedure that takes BOOLEAN arguments.

  • Using PL/SQL Function with CLOB types and a Java Source

    Hi people.
    I have some problems trying to use a function in pl/sql with a CLOB parameter to a java source function.
    Here is the problem: I have to read a TXT file and return a CLOB with the data of the file. The reading is done with a java source function.
    The problem is how to read the file without messing the content and return it to the pl/sql function?
    Another problem: If I pass a CLOB as a parameter to a pl/sql function and have to write the content to a file, how to do it without screwing the EOL chars and so?
    My code is:
    /******** PLSQL FUNCTIONS ********/
    function fn_gravaconteudoarquivo( pv_caminho in varchar2
    , pv_nomearquivo in varchar2
    , pc_conteudo in clob ) return varchar2 as language java
    name 'Importacao.gravaConteudoArquivo(java.lang.String, java.lang.String, oracle.sql.CLOB) return varchar2';
    function fn_lerconteudoarquivoclob( pv_caminho in varchar2
    , pv_nomearquivo in varchar2 ) return clob as language java
    name 'Importacao.lerArquivoClob(java.lang.String, java.lang.String) return clob';
    /******** JAVA SOURCE FUNCTIONS *********/
    public static String gravaConteudoArquivo(String caminho, String nomeArquivo, CLOB conteudo) {
    File file = new File(caminho, nomeArquivo);
    PrintWriter pwFile;
    String mensagem = "";
    StringBuffer sb = new StringBuffer();
    try {
    pwFile = new PrintWriter(new BufferedWriter(new FileWriter(file,true)));
    for (int i=0;i<=(conteudo.length()/32000);i++) {
    sb.append(conteudo.getSubString(conteudo.getLength()+1,32000));
    pwFile.println(sb.substring(0));
    pwFile.close();
    } catch (Exception ex) {
    mensagem = "Erro: "+ex;
    return mensagem;
    public static CLOB lerArquivoClob(String caminho, String nomeArquivo) throws SQLException {
    File file = new File(caminho, nomeArquivo);
    Connection conn;
    CLOB clob = null;
    String lineSep = System.getProperty("line.separator");
    StringBuffer sb = new StringBuffer();
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:csdesv", "csestoque", "liberada");
    clob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
    BufferedReader brFile = new BufferedReader(new FileReader(file.getPath()));
    while (brFile.ready()) {
    sb.append(brFile.readLine());
    sb.append(lineSep);
    clob.open(CLOB.MODE_READWRITE);
    clob.setString(clob.getLength()+1, sb.toString());
    clob.close();
    } catch (Exception ex) {
    ex.printStackTrace();
    return clob;
    Ah, just remembered... This will work as a JOB.... >.< ... So the connection aparently is at localhost.
    Thanks.

    No one? I really need this....

  • MAKING A SQL QUERY WITH LIKE SINTAX

    Im trying to make a string with a sql query.
    the object is return a select statement in the var string and the select statement must be return a string like that :
    select item1, item2, item3 from table where
    item1 like '%PEPE%' and item2 like '%COSA2%';
    then I make a string like that :
    lq_sql := 'select item1, item2, item3 from table where item1 like '||'%'||:P1_NOMBRE||'%'
    but this give errors.
    Any help? thanks in advanced and regards everybody.

    Hello,
    If you check your statement in sql*plus this is how it will look like:
    select 'select item1, item2, item3 from table where item1 like '||'%'||&P1_NOMBRE||'%' txt
    from dual
    Enter value for p1_nombre: 3
    result:
    TXT
    select item1, item2, item3 from table where item1 like %3%
    ***You are missing single quotes before and after the % statement, as follows:
    select 'select item1, item2, item3 from table where item1 like '||'''%'||&P1_NOMBRE||'%''' txt
    from dual
    Enter value for p1_nombre: 3
    result:
    TXT
    select item1, item2, item3 from table where item1 like '%3%'BTW, i changed colon (:) to ampersand (&) to run it in SQL*plus but it should be a colon.
    -Marilyn

  • SQL Query With Like Operator - Performance is very poor - Oracle Apps Table

    Hi,
    I'm querying one of the Oracle Applications Standard Table. The performance is very slow when like operator is used in the query condition. The query uses a indexed column in the where clause.
    The query is..
    select * from hz_parties
    where upper(party_name) like '%TOY%'
    In the above case, It is not using the index and doing full table scan. I have checked the explain plan and the cost is 4496.
    select * from hz_parties
    where upper(party_name) like 'TOY%'
    If I remove the '%' at the begining of the string, the performance is good and it is using the index. In this case, the cost is 5.
    Any ideas to improve the performance of the above query. I have to retrieve the records whose name contains the string. I have tried hints to force the use of index. But it is of no use.
    Thanks,
    Rama

    If new indexes are disallowed, not a lot of good ones, no.
    If you know what keyword(s) are going to be searched for, a materialized view might help, but I assume that you're searching based on user input. In that case, you'd have to essentially build your own Text index using materialized views, which will almost certainly be less efficient and require more maintenance than the built-in functionality.
    There may not be much you could do to affect the query plan in a reasonable way. Depending on the size of the table, how much RAM you're willing to throw at the problem, how your system is administered, and what Oracle Apps requires/ prohibits in terms of database configuration, you might be able to force Oracle to cache this table so that your full table scans are at least more efficient.
    Justin

  • Future support for using PL/SQL core business logic with ADF BC

    We want to migrate our large Forms client/server (6i) application to ADF, possibly using a migration tool like Ciphersoft Exodus.
    One scenario could be to use ADF BC and ADF-Faces or a different JSF-Implementation for presentation and business layer but keep our heavy PL/SQL-businesslogic inside the Oracle database in packages, triggers, functions and procedures.
    This scenario could be chosen due to the huge amount of interconnected logic inside the database (10 years of development; no technical components; any package may access any table and more of this kind of dependencies). The business logic nowadays held in Forms client will be moved mainly into the database as a prerequisite to this scenario.
    Choosing this "keep-logic-in-DB"-scenario we need a good support by ADF BC to do so. We know and prototyped that it is possible to call some PL/SQL via JDBC from ADF BC and it is possible to use stored procedure calls for standard business entity data access (ins, del, upd, ..). But this does not solve our problems. We want to reuse core business logic coded in PL/SQL. This is much more than change the ADF standard behavior for an update with an own PL/SQL-call.
    Now my question:
    Will there be a kind of sophisticated support to use ADF BC in combination with database-kept logic?
    If so, when will this happen and how will the common problems of transactional state inside the database and inside the ADF BC be solved? Any plans or ideas yet?
    Many other clients do have similar applications built in Forms and PL/SQL and would be glad to hear about a path of direction.
    I've read the technical article 'understanding the ADF BC state management feature' which you have contributed to. One current limitation is pointed out there: Using PL/SQL with ADF BC limits ADF AM pooling to 'restricted level' which reduces scalability.
    Are you aware of additional main problems/tasks to solve when using PL/SQL heavily with ADF BC, which we have to think about?
    Thank you for any response.
    Ingmar

    My main problem is two 'concurrent' areas holding state in an application system based on DB-stored PL/SQL-logic in combination with ADF BC.
    For a new System everything can be made ok:
    Sure, it is possible to build a new system with the business logic included in ADF BC only. All long-living state will be handled in the BC layer ( including support for UnitsOfWork longer than the webside short HTTP-requests and HTTP-sessions and longer than the database transactions.
    For an old system these problems arise:
    1. DB data changes not reflected in BC layer:
    Our PL/SQL-logic changes data in tables without notifying the ADF BC layer (and its cache). To keep the data in ADF BC entity objects identical to the changed database content a synchronization is needed. BC does not know which part of the application data has been changed because it has not initiated the changes through its entity objects. Therefore a full refresh is needed. In a Forms4GL environment the behavior is similar: We do frequently requeries of all relevant (base)tables after calling database stored logic to be sure to get the changed data to display and to operate on it.
    -> Reengineering of the PL/SQL-logic to make the ADF BC layer aware of the changes is a big effort (notifying BC about any change)
    2. longer living database transactions
    Our PL/SQL-logic in some areas makes use of lengthy database transactions. The technical DB-transaction is similar to the UnitOfWork. If we call this existing logic from ADF BC, database state is produced which will not be DB-committed in the same cycle.
    This reduces scalability of ADF BC AM pooling.
    Example:
    a) Call a DB-stored logic to check if some business data is consistent and prepare some data for versioning. This starts a DB-transaction but does not commit it.
    b) Control is handed back to the user interface. Successful result of step a) is displayed
    c) User now executes the versioning operation
    d) Call another DB-stored logic to execute the versioning. DB-transaction is still open
    e) Business layer commits the transaction automatically after successful finishing step d). Otherwise everything from a) to e) is rolled back.
    -> redesign of this behavior (= cutting the 1to1 relation between LogicalUnitOfWork and the technicalDatabaseTransaction is a big effort due to the big amount of code.

  • Problem using a SQL database Catalogue to insert data to a table

    I am developing with Version:
    10.3.1.0, Build: #99765....
    as part of a step in my process I need to store some data in an audit table.
    I have setup the SQL Catalogue entry and then use the following code:
    sentMail is defined as a local variable
    sentMail = RSPCA.Resources.RSPCA.R_SENTEMAIL()
    sentMail.sentemailBody = sendInternalRequest.htmlbody
    sentMail.sentemailDatesent = Fuego.Lang.Time
    sentMail.sentemailSubject = subject
    sentMail.sentemailTo = creation.participant.email
    sentMail.sentemailType = "People"
    store sentMail
    This works if I comment out this line:
    sentMail.sentemailBody = sendInternalRequest.htmlbody
    The issue I'm having maybe something to do with the size of the data, in oracle the field is a varchar2(4000) and it looks like the catalogue treats it as a String(4000), if I make sure I only put around 1500 characters in the field it works, but as soon as I put all in from my test data (about 2300) it fails with this message:
    The method 'CIL_sendToHQ' from class 'EstablishmentManagement.EMMaintainPeopleProcess.Default_1_0.Instance' could not be successfully executed.
    Caused by: [BEA][Oracle JDBC Driver][Oracle]ORA-01461: can bind a LONG value only for insert into a LONG column
    Caused by: [BEA][Oracle JDBC Driver][Oracle]ORA-01461: can bind a LONG value only for insert into a LONG column
    fuego.lang.ComponentExecutionException: The method 'CIL_sendToHQ' from class 'EstablishmentManagement.EMMaintainPeopleProcess.Default_1_0.Instance' could not be successfully executed.
         at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:519)
         at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:273)
         at fuego.fengine.FEEngineExecutionContext.invokeMethodAsCil(FEEngineExecutionContext.java:219)
         at fuego.server.execution.EngineExecutionContext.runCil(EngineExecutionContext.java:1278)
         at fuego.server.execution.microactivity.ComponentExecutionMicroActivity.runCil(ComponentExecutionMicroActivity.java:126)
         at fuego.server.execution.microactivity.ComponentExecutionMicroActivity.execute(ComponentExecutionMicroActivity.java:84)
         at fuego.server.execution.microactivity.MicroActivityEngineExecutionHandler.executeActivity(MicroActivityEngineExecutionHandler.java:57)
         at fuego.server.execution.ImmediateActivity.execute(ImmediateActivity.java:42)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
         at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:62)
         at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42)
         at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:251)
         at fuego.server.execution.ToDoItem.run(ToDoItem.java:536)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:775)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
         at fuego.fengine.ToDoQueueThread$PrincipalWrapper.processBatch(ToDoQueueThread.java:450)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
    Caused by: fuego.components.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-01461: can bind a LONG value only for insert into a LONG column
         at fuego.sql.TableSQLObject.implicitStore(TableSQLObject.java:409)
         at fuego.sql.TableSQLObject.store(TableSQLObject.java:340)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
         at fuego.sql.SQLObject.invoke(SQLObject.java:364)
         at fuego.lang.Invokeable.invokeImpl(Invokeable.java:234)
         at fuego.lang.Invokeable.invokeDynamic(Invokeable.java:188)
         at EstablishmentManagement.EMMaintainPeopleProcess.Default_1_0.Instance.CIL_sendToHQ(Instance.xcdl:100)
         at EstablishmentManagement.EMMaintainPeopleProcess.Default_1_0.Instance.CIL_sendToHQ(Instance.xcdl)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:512)
         ... 23 more
    Caused by: java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-01461: can bind a LONG value only for insert into a LONG column
         at albpm.jdbc.base.BaseExceptions.createException(Unknown Source)
         at albpm.jdbc.base.BaseExceptions.getException(Unknown Source)
         at albpm.jdbc.oracle.OracleImplStatement.execute(Unknown Source)
         at albpm.jdbc.base.BaseStatement.commonExecute(Unknown Source)
         at albpm.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
         at albpm.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
         at fuego.jdbc.FaultTolerantPreparedStatement.executeUpdate(FaultTolerantPreparedStatement.java:623)
         at fuego.sql.TableSQLObject.insert(TableSQLObject.java:626)
         at fuego.sql.TableSQLObject.implicitStore(TableSQLObject.java:391)
         ... 39 more
    Edited by: user10778731 on 21-Jan-2010 06:17

    Suspect you're not going to like this answer, but I never use the store() method for a database heir object anymore.
    The store() database method has been broken and then fixed and then broken again on too many release cycles to trust that it will work consistently as MPs/Hotfixes are applied. I'd suspect that your "String(4000)" problem might also be related to using the store() method.
    Others will probably disagree, but only use the OOTB PBL (JDBC) SQL or Dynamic SQL in the PBL logic. In your case, I think you might be best served by using Dynamic SQL. With Dynamic SQL you don't run into the shortcomings of JDBC SQL (String(4000) might be one of them) and you can then test / debug your SQL in your favorite DB tool of choice first (e.g. Toad, Squirrel, Sql Plus). Once successfully tested, you can then paste it back into your PBL.
    Dan

  • Footer navigation using pl/sql - substitution strings

    Hi
    I want to make a footer navigation (a BLAF like footer with the same captions and links that appear in the Tabs and the Navigation Bar) using a PL/SQL region. The code I want to use should work for any HTML DB application.
    The procedure could be defined like this:
    PROCEDURE prb_footer_navigation( p_application_id VARCHAR2
    , p_page_id VARCHAR2
    , p_session_id VARCHAR2);
    p_application_id will be used to get the caption and links of the specific application and p_page_id will be used to know which tab is selected.
    I'm using this query in the procedure:
    SELECT t.tab_text caption
    , t.tab_target link
    , t.tab_sequence num
    FROM flows_010600.wwv_flow_toplevel_tabs t
    WHERE t.flow_id = p_application_id
    ORDER BY t.tab_sequence
    (the user has been granted select from flows_010600.wwv_flow_toplevel_tabs)
    The problem is:
    tab_target has substitution strings like '&XXX.' or '&PX_XXX.', so how can I get the real link with resolved substitution strings using pl/sql?
    Something like function_resolve_string(p_string, p_session_id) would be appreciated...
    Thanks in advance!

    A.U.,
    Have you considered looking at how the navigation bar gets onto your page by examining the page template? You'll find something like this in the body section: 
      <table width="100%" cellpadding="0" cellspacing="0" border="0" summary="">
        <tr>
          <td valign="top" class="t1Logo">#LOGO#</td>
          <td align="right" valign="top">#NAVIGATION_BAR#</td>
        </tr>
      </table>Just copy and paste that onto the end of the body section, or into the footer section of the template, although the footer might not support all the same substitution patterns.
    If that's the kind of result you have in mind, do the same thing for the (html) tables that contain #PARENT_TAB_CELLS# and #TAB_CELLS#. I don't guarantee this will work, but it's worth experimenting with.
    Scott

  • OBIEE 10g - Can I use logical SQL to set variable?

    I am trying to set value of a session variable in the Advanced tab Prefix box of a request.
    Assigment of absolute value like this is working good:
    SET VARIABLE MYVAR=1;
    Can I set the variable using logical SQL? Something like:
    SET VARIABLE MYVAR = (SELECT table1.col1 from catname where table1.col2=1)
    Thanks in advance.

    Hi,
    You can create a session variable or dynamic variable in the RPD and try using it in here at the Advanced Tab prefix.
    But still check yourself if you need multiple values returning in the SQL statement.
    Hope this is helpful/ useful.
    Regards
    MuRam

  • Cannot login to XE using PL/SQL Developer Tool

    Hi,
    I have problem using PL/SQL Developer with XE. Whenever I try to use PL/SQL Developer to connect to the XE, I am getting this error message from PL/SQL Developer:
    Initialization error: SQL*Net not properly installed.
    OracleHomeKey: SOFTWARE\ORACLE
    OracleHomeDir:
    Both the PL/SQL Developer and XE are installed on a same laptop which is having XP with SP2 and its firewall disabled.
    My "sqlnet.ora" reads the following:
    # This file is actually generated by netca. But if customers choose to
    # install "Software Only", this file wont exist and without the native
    # authentication, they will not be able to connect to the database on NT.
    SQLNET.AUTHENTICATION_SERVICES = (NTS).
    Any help would be much appreciated.
    Regards,
    Abdiqadir.

    Had the same problem myself. I tried this and it worked. Mind you, BOTH Oracle XE and PL/SQL Developer have to be on same machines. I have WinXPSP2. Change the installation paths as per your settings in the examples below.
    In PL/SQL Developer:
    - Tools-->Preferences-->Options Tab-->
    ---- Oracle Home (empty is autodected): enter this value: C:\oraclexe\app\oracle\product\10.2.0\server
    ---- OCI Library (empty is autodected): enter this value:
    C:\oraclexe\app\oracle\product\10.2.0\server\BIN\ociw32.dll
    That's it. It worked for me.

Maybe you are looking for