CallableStatement using named parameters: is that possible?

Hi,
Can I use named parameter in a statement to be executed with CallableStatement, in stead of using :1, :2, etc ?
thanks
Ronny

Your question is a little ambiguous. However, I will try to answer it.
You need to use a program to send the email for you. On Solaris by default this is sendmail. However, it can be used in a number of modes.
1. It can be run as a daemon, listening on port 25 for new messages to be delivered to it.
This is enabled by default but is not necessary for sending email. If you wish to switch sendmail off as a service in Solaris10 then you should type 'svcadm disable svc:/network/smtp:sendmail'. If you wish to switch it off on earlier Solaris releases you will need to move/erase the startup script in either /etc/rc2.d or /etc/rc3.d.
2. It can be run in 'immediate mode' to send mail immediately.
This allows you to send a mail directly to someone. On a normally configured sendmail instance it will try to deliver the mail immediately - if the server at the other end is unavailable, the mail will be queued locally to be potentially delivered at a later date.
3. It can run in delivery only mode to attempt to send queued mail
Queued mail will not automatically get processed. Sendmail needs to run at a later date to attempt to deliver any queued mail. This can either be done via cron using 'sendmail -q' or sendmail can be left running the whole time and told to rerun the queue in given periods ie 'sendmail -q15m'
There are alternatives to sendmail for delivering mail - postfix, exim, qmail are just three examples. I would advise against trying to deliver mail without using a specific mail agent to do it. Whilst the SMTP mail protocol is pretty simple in basic use cases the protocol does get complex. There is no real downside in using an established program.
HTH.

Similar Messages

  • Named Parameters in Functions: Possible?

    I want to use named parameters to call PL/SQL functions using JDBC, as is best practice and necessary for default values to work. Unfortunatley all the examples I found are for procedures only. Using a positional registerOutParameter with named register / get methods on the CallableStatement does not work, obiviously.
    Is there any proper way to use named parameters with functions ? Proper does not include writing wrapper procedures nor turning functions into procedures.

    Hi Avi,
    as far as I know the return value of a PL/SQL function does not have a name, as oposed to the parameters of a PL/SQL function, which must have a name. One could argue that the return value of a function is called the same as the function itself. I have tried that option but it does not work.
    Unfortunatley the method OraclePreparedStatement.registerReturnParameter refers to something else than the return value of a PL/SQL function. Is it possible that the developers of the driver have forgotten something?

  • NOT Using Named Parameters in a Native Query

    Hi!
    like it is written in the Toplink JPA Extensions reference Toplink supports using named parameters in native queries.
    See example from http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-extensions.html:
    Example 1-11 Specifying a Named Parameter With #
    Query queryEmployees = entityManager.createNativeQuery(
    "SELECT OBJECT(emp) FROM Employee emp WHERE emp.firstName = #firstname"
    queryEmployeeByFirstName.setParameter("firstName", "Joan");
    Collection employees = queryEmployees.getResultList();
    But I want to use "#" in the SQL statement so I want to disable this parameter binding somehow and let the query just execute the SELECT statement I deliver.
    I have tried to add the property
    <property name="toplink.jdbc.bind-parameters" value="false"/>
    into the persistence.xml and I have also tried to add the query hint
    query.setHint(TopLinkQueryHints.BIND_PARAMETERS, HintValues.FALSE);
    but none of them prevents the # to be uses as a paramter. this causes the exception:
    Exception [TOPLINK-6132] (Oracle TopLink Essentials - 9.1 (Build b22)): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: Query argument ######' not found in list of parameters provided during query execution.
    Query: ReadAllQuery(de.merck.compas.material.SimilarLocalMaterialListItemBV)
    The SQL Statement is
    SELECT * FROM TABLE (
    CAST ( RCGC.PHA_P_COMPASMDM.LookupSimilarMats
    ( 'COC003','10021500150000000997','30','30','040','standard','','001001','001001','123456','##########','X','X','X','X','U' )
    AS RCGC.PHA_COMPAS_SIMILAR_MATS ) )
    I am using the latest Toplink essentials build together with an Oracle 9.2i DB in a Java SE web application.
    Can anyone give me a little hint what to do?
    Thanks and best regards,
    Alex

    I hope this is what you need:
    [TopLink Fine]: 2007.01.19 02:56:48.278--ServerSession(17712783)--Connection(723185)--Thread(Thread[http-8080-Processor2
    3,5,main])--SELECT APPL_CGP_MATLOC, CHANGE_REQ_MATLOC, CD_PHA_MAT_LOC, LCOMP, LOC_MAT_NAME, APPL_GDM_MATLOC, LOC_MAT_NAM
    E_SHORT, APPL_PDW_MATLOC, PHA_MAT_LOC_LCOMMENT, APPL_TP_MATLOC, DIVISION, APPL_WRS_MATLOC, ARTICLE_ID_MDA, LU_PHA_MAT_LO
    C, LOC_MAT_NAME_OLD, LDT_PHA_MAT_LOC, PHA_MAT_LOC_STATUS, CU_PHA_MAT_LOC, MAT_LOC_ID, RCOMP, MAT_ID FROM RCGC.PHA_V_COMP
    AS_MAT_MATLOC WHERE ((MAT_LOC_ID = '123456') AND (RCOMP = '001001'))
    [TopLink Fine]: 2007.01.19 02:56:48.398--ServerSession(17712783)--Connection(32404901)--Thread(Thread[http-8080-Processo
    r23,5,main])--SELECT MAT_ID, DESCRIPTION, PHA_MATERIAL_LCOMMENT, PACKSIZE, LU_PHA_MATERIAL, PACKSIZE_UNIT, LDT_PHA_MATER
    IAL, CONTAINER_NAME, CU_PHA_MATERIAL, PURPOSE, CD_PHA_MATERIAL, CONTENT, CONTAINER_ID, AI_FACTOR, PHA_MATERIAL_STATUS, C
    MG_SPEC_APP, PROD_LEVEL, PACKAGE_SIZE, PRODUCT_ID FROM RCGC.PHA_V_COMPAS_MATERIAL WHERE (MAT_ID = '10021500150000000997'
    [TopLink Fine]: 2007.01.19 02:56:48.468--ServerSession(17712783)--Connection(723185)--Thread(Thread[http-8080-Processor2
    3,5,main])--SELECT PRODUCT_ID, PROD_GRP_ID, APPL_FORM_NAME, PRODUCT_NAME, GALENIC_FORM_NAME, APPL_FORM_ID, PHA_PRODUCT_S
    TATUS, PHA_PRODUCT_LCOMMENT, GALENIC_FORM_ID, LU_PHA_PRODUCT, INN, LDT_PHA_PRODUCT FROM RCGC.PHA_V_COMPAS_PRODUCT WHERE
    (PRODUCT_ID = 'COC003')
    [TopLink Fine]: 2007.01.19 02:56:48.568--ServerSession(17712783)--Connection(32404901)--Thread(Thread[http-8080-Processo
    r23,5,main])--SELECT APPL_CGP_MATLOC, CHANGE_REQ_MATLOC, CD_PHA_MAT_LOC, LCOMP, LOC_MAT_NAME, APPL_GDM_MATLOC, LOC_MAT_N
    AME_SHORT, APPL_PDW_MATLOC, PHA_MAT_LOC_LCOMMENT, APPL_TP_MATLOC, DIVISION, APPL_WRS_MATLOC, ARTICLE_ID_MDA, LU_PHA_MAT_
    LOC, LOC_MAT_NAME_OLD, LDT_PHA_MAT_LOC, PHA_MAT_LOC_STATUS, CU_PHA_MAT_LOC, MAT_LOC_ID, RCOMP, MAT_ID FROM RCGC.PHA_V_CO
    MPAS_MAT_MATLOC WHERE (MAT_ID = '10021500150000000997')
    [TopLink Warning]: 2007.01.19 02:56:48.638--UnitOfWork(4469532)--Thread(Thread[http-8080-Processor23,5,main])--Exception
    [TOPLINK-6132] (Oracle TopLink Essentials - 9.1 (Build b22)): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: Query argument ######' not found in list of parameters provided during query execution.
    Query: ReadAllQuery(de.merck.compas.material.SimilarLocalMaterialListItemBV)
    Local Exception Stack:
    Exception [TOPLINK-6132] (Oracle TopLink Essentials - 9.1 (Build b22)): oracle.toplink.essentials.exceptions.QueryExcept
    ion
    Exception Description: Query argument ######' not found in list of parameters provided during query execution.
    Query: ReadAllQuery(de.merck.compas.material.SimilarLocalMaterialListItemBV)
    at oracle.toplink.essentials.exceptions.QueryException.namedArgumentNotFoundInQueryParameters(QueryException.jav
    a:206)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceCall.getValueForInParameter(DatasourceCall.java:6
    86)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceCall.getValueForInOutParameter(DatasourceCall.jav
    a:704)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceCall.translateQueryString(DatasourceCall.java:630
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseCall.translate(DatabaseCall.java:850)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQuer
    yMechanism.java:212)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQuer
    yMechanism.java:199)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCa
    llQueryMechanism.java:270)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQu
    eryMechanism.java:600)
    at oracle.toplink.essentials.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:302)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:
    709)
    at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:609)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:677)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:7
    31)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2218)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:937)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:909)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:346)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getResultList(EJBQueryImpl.java:447)
    at de.merck.compas.material.SimilarLocalMaterialListItemBC.selectList(SimilarLocalMaterialListItemBC.java:40)
    at de.merck.compas.material.SimilarLocalMaterialListItemBC.selectSimilar(SimilarLocalMaterialListItemBC.java:53)
    at de.merck.compas.material.MaterialMaintainFS.init(MaterialMaintainFS.java:158)
    at de.merck.compas.material.MaterialListSV.startMaterialMaintain(MaterialListSV.java:186)
    at de.merck.compas.material.MaterialListSV.processPage(MaterialListSV.java:97)
    at de.merck.jsfw.servletFramework.AbstractServlet.processPage(AbstractServlet.java:141)
    at de.merck.jsfw.servletFramework.ControllerServlet.processLastPage(ControllerServlet.java:240)
    at de.merck.jsfw.servletFramework.ControllerServlet.processRequest(ControllerServlet.java:206)
    at de.merck.jsfw.servletFramework.ControllerServlet.doGet(ControllerServlet.java:181)
    at de.merck.jsfw.servletFramework.ControllerServlet.doPost(ControllerServlet.java:191)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at de.merck.comp.ntml.NTLMFilter.negotiate(NTLMFilter.java:384)
    at de.merck.comp.ntml.NTLMFilter.doFilter(NTLMFilter.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
    :664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    The Toplink manifest file with version number:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.6.5
    Created-By: 1.5.0_09-b03 (Sun Microsystems Inc.)
    Specification-Title: Java Persistence API
    Specification-Vendor: Sun Microsystems, Inc., Oracle Corp.
    Specification-Version: 1.0
    Implementation-Title: TopLink Essentials
    Implementation-Vendor: Sun Microsystems, Inc., Oracle Corp.
    Implementation-Version: 9.1 build: b22
    Thanks again for your help!

  • Using named parameters with an sql UPDATE statement

    I am trying to write a simple? application on my Windows 7 PC using HTML, Javascript and Sqlite.  I have created a database with a 3 row table and pre-populated it with data.  I have written an HTML data entry form for modifying the data and am able to open the database and populate the form.  I am having trouble with my UPDATE function.  The current version of the function will saves the entry in the last row of the HTML table into the first two rows of the Sqlite data table -- but I'm so worn out on this that I can't tell if it is accidental or the clue I need to fix it.
    This is the full contents of the function . . .
         updateData = new air.SQLStatement();
         updateData.sqlConnection = conn;
         updateData.text = "UPDATE tablename SET Gsts = "Gsts, Gwid = :Gwid, GTitle = :GTitle WHERE GId = ":GId;
              var x = document.getElementsById("formname");
              for (var i = 1, row, row = x.rows[i]; i++) {
                   updateData.parameters[":GId"] = 1;
                   for (var j = 0, col; col=row.cells[j]; j++) {
                        switch(j) {
                             case 0: updateData.parameters[":GTitle"] = col.firstChild.value; break;
                             case 1: updateData.parameters[":Gsts"] = col.firstChild.value; break;
                             case 2: updateData.parameters[":Gwid"] = col.firstChild.value; break;
    Note: When I inspect the contents of the col.firstChild.value cases, they show the proper data as entered in the form -- it just isn't being updated into the proper rows of the Sqlite table.
    Am I using the named parameters correctly? I couldn't find much information on the proper use of parameters in an UPDATE statement.

    Thank you for the notes.  Yes, the misplaced quotes were typos.  I'm handtyping a truncated version of the function so I don't put too much info in the post. And yes, i = 1 'cuz the first rows of the table are titles.  So the current frustration is that I seem to be assigning all the right data to the right parameters but nothing is saving to the database.
    I declare updateData as a variable at the top of the script file
    Then I start a function for updating the data which establishes the sql connection as shown above.
    The correctly typed.text statement is:
            updateData.text = "UPDATE tablename SET Gsts=:Gsts, Gwid=:Gwid, GTitle=:GTitle WHERE GId=:GId";
    (The data I'm saving is entered in text boxes inside table cells.) And the current version of the loop is:
            myTable = document.getElementById("GaugeSts");
            myRows= myTable.rows;
              for(i=1, i<myRows.length, i++) {
                   updateData.parameters[":GId"]=i;
                   for(j=0; j<myRows(i).cells.length, j++) {
                        switch(y) {
                             case 0: updateData.parameters[":GTitle"]=myrows[i].cells[y].firstChild.value; break;
                             case 1: updateData.parameters[":Gsts"]=myrows[i].cells[y].firstChild.value; break;
                             case 2: updateData.parameters[":Gwid"]=myrows[i].cells[y].firstChild.value; break;
                             updateData.execute;
    The whole thing runs without error and when I include the statements to check what's in myrows[i].cells[y].firstChild.value, I'm seeing that the correct data is being picked up for assignment to the parameters and the update. I haven't been able to double check that the contents of the parameters are actually taking the data 'cuz I don't know how to extract the data from the parameters. ( The only reference  I've found so far has said that it is not possible. I'm still researching that one.) I've also tried moving the position of the updateData execution statement to several different locations in the loop andstill nothing updates. 
    I am using a combination of air.Introspector.Console.log to check the results of code and I'm using Firefox's SQlite manager to handle the database.  The database is currently sitting on the Desktop to facilitate testing and I have successfully updated/changed data in this table through the SQLite Manager so I don't think I'm having permission errors and, see below, I have another function successfully saving data to another table.
    I currently have another function that uses ? for the parametersin the .text of a INSERT/REPLACE statement and that one works fine.  But, only one line of data is being saved so there is no loop involved.  I tried changing the UPDATE statement in this function to the INSERT/REPLACE just to make something save back to the database but I can't make that one work either.I've a (And, I've tried so many things now, I don't even remember what actually saved something --albeit incorrectly --to the database in one of my previous iterations with the for loops.)
    I'm currently poring through Sqlite and Javascript tomes to see if I can find what's missing but if anything else jumps out at you with the corrected code, I'd appreciate some ideas.
    Jeane

  • I want to redirect mails having attachments to other account automatically by creating rules or using automator. Is that possible?

    I have a problem opening mails that have attachment in it because the corporate policy does't allow downloading attachments. I want to redirect those mails to my corporate account so that I can download attachments using corporate mail client.
    Is that possible?

    Just add a rule and select "Attachment type" then in the drop down menu select what kind.
    If you want all of those attachment types to be sent to the other account or what not. Then you're going have to click on the + on the far right until you've filled them all... I did a few of them for an example.
    KOT

  • My 8 year old wants a touch, but i want to lock the internet so he can't use it. Is that possible?

    My 8 year old wants a IPod Touch, but I want to be able to disable the internet on it for him. Is that possible, so he can't just surf the web.

    As others have mentioned on this thread, it is possible to turn off the default browser and setup an alternate safe browser app to allow your family to access the Internet safely and securely. You will need to:
    - Enable the Restrictions feature (Settings > General > Restrictions > Enable Restrictions)
    - Turn off Safari and YouTube
    - Turn off Installing Apps (after you install the apps you need)
    - Download and setup a safe browser (like Mobicip)
    Follow the step-by-step instructions in one of these tutorials to proceed.
    How To Setup Parental Controls on iPhone & iPod Touch (iOS 4 Edition)
    How To Setup Parental Controls on iPad (iOS 4.2 Edition)
    Disclaimer: This answer was posted by a Mobicip employee who may stand to gain indirectly from it.

  • I want to try Adobe Cloud for Dreamweaver using Ubuntu. Is that possible ?

    When i try to download the Free Trial for Dreamweaver it says service is not available now and contact support. I assume this may be because i am using Ubuntu. How can Ubuntu users make use of Dreamweaver (i want to use the Phonegap features of Dreamweaver).

    System requirements for Cloud Programs
    -http://www.adobe.com/products/creativecloud/tech-specs.html

  • Named parameters in stored function

    Hi,
    I am trying to execute stored function from java in oracle . I am using Oracle 9.2.0.1.0 and the newest JDBC drivers, ie. for 10g which are compatible. I have flicked through JDBC Named Parameters example but it only addresses stored procedures.
    The problem I have is that I do not know what name the return value of stored procedure has.
    stored function parameter names:
    1. ????
    2. test1 Mode: IN
    3. test2 Mode: IN
    ?=call test_function(?,?);
    When I am trying to set values as indexes everything works perfect.
    CallableStatement cs = .....
    cs.registerOutParameter(1, Types.VARCHAR);
    cs.setString(2, "a");
    cs.setString(3, "b");
    cs.execute();
    String returnedValue = cs.getString(1);
    However, when I am trying to use named parameters the code looks like this:
    CallableStatement cs = .....
    cs.registerOutParameter(1, TYPES.VARCHAR);
    cs.setString("test1", "a");
    cs.setString("test2", "b");
    and the question is what is the name of return parameter.
    I have tried to put the same name as the name of stored function but is reports error.
    Instead I had to first getmetadata from oracle and in case of stored functions utilize it, unfortunatelly getting metadata has perfomance issues and I heard that oracle 10g is even slower in getting metadata.
    If anyone knows the answer to my question, please answer.
    Thank you in advance,
    Mateusz Szczap
    Java Programmer
    NCDC
    [email protected]
    http://www.ncdc.pl

    Hi,
    I am trying to execute stored function from java in oracle . I am using Oracle 9.2.0.1.0 and the newest JDBC drivers, ie. for 10g which are compatible. I have flicked through JDBC Named Parameters example but it only addresses stored procedures.
    The problem I have is that I do not know what name the return value of stored procedure has.
    stored function parameter names:
    1. ????
    2. test1 Mode: IN
    3. test2 Mode: IN
    ?=call test_function(?,?);
    When I am trying to set values as indexes everything works perfect.
    CallableStatement cs = .....
    cs.registerOutParameter(1, Types.VARCHAR);
    cs.setString(2, "a");
    cs.setString(3, "b");
    cs.execute();
    String returnedValue = cs.getString(1);
    However, when I am trying to use named parameters the code looks like this:
    CallableStatement cs = .....
    cs.registerOutParameter(1, TYPES.VARCHAR);
    cs.setString("test1", "a");
    cs.setString("test2", "b");
    and the question is what is the name of return parameter.
    I have tried to put the same name as the name of stored function but is reports error.
    Instead I had to first getmetadata from oracle and in case of stored functions utilize it, unfortunatelly getting metadata has perfomance issues and I heard that oracle 10g is even slower in getting metadata.
    If anyone knows the answer to my question, please answer.
    Thank you in advance,
    Mateusz Szczap
    Java Programmer
    NCDC
    [email protected]
    http://www.ncdc.pl

  • Native TopLink named query with named parameters

    Hello,
    Defining my metadata in native TopLink xml and using the native TopLink's Session interface I can access and successfully execute a named query using positional parameters (parameters passed to match the ?1 ?2 etc). I used for this the Session.executeQuery(String, Class, List) method e.g.
    select p from Person p where p.name = ?1
    Now, how can I get the same Session to execute named queries using named parameters? None of the Session.executeQuery methods seem suitable ... Am I missing anything here? e.g.
    select p from Person p where p.age = :age
    I can't find in Session http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/b13698/oracle/toplink/sessions/Session.html a good match for this use-case. I would expect something like:
    Session.executeQuery(String queryName, Class target, List argNames, List argValues)
    or
    Session.executeQuery(String queryName, Class target, Map argsKeyedByName)
    but can't find any good match, can anyone please enlighten me?
    Thanks in advance,
    Best regards,
    Giovanni

    Hello Chris,
    Many thanks for your response. I am sorry if I did not explain my problem properly.
    Suppose I already defined a named query in the metadata XXXProject.xml using the <opm:querying ... this JPQL named query "customFinder" already exists and would look something like:
    select p from Person p where p.firstname=:firstname and p.lastname=:lastname and p.birthdate=:birthdate
    now say you want to execute this query from the Session:
    Vector args = new Vector();
    // how do you know the order? you shouldn't know the order!
    // you know only the parameter names and that's what I mean
    // about named parameters
    // This args setup is wrong ... I need a way to specify to which
    // parameter name each argument corresponds to. In other words
    // if the named query where criteria order of parameters is modified
    // perhaps because of pruning composite keys etc you won't break the
    // existing code ...
    args.add(new Date());
    args.add("Azua");
    args.add("Giovanni");
    Session session = ...
    session.executeQuery("customFinder", Person.class, args);
    JPA supports both type of queries positional parameters and named parameters. Your explanation above is only for the first, my question refers to the later.
    I have not yet found the api for this ... though I am investigating along the lines of:
    Query query = session.getQuery("customFinder");
    and then try to assign the arguments in the same order that the parameters are defined in query or?
    Thanks in advance,
    Best regards,
    Giovanni
    Edited by: bravegag on 29.05.2009 08:06

  • CallableStatement fails with named parameters

    A mystery. Very confusing. I have MSSQL. I use CallableStatement. When I set SP's paramters by index, e.g. setInt(1, 1), the call succeeds. However if I use named parameter approach, the call fails with exception "Error: [SQLException] Parameter '@pMyParam' not found in the parameter list.". The spelling appears correct -- compared letter by letter. Any ideas?

    You have a mistake or there is a bug in the driver.
    I would check to see if there is documentation for the driver you are using that has an example of doing what you are doing and see if you are doing it correctly according to that documentation. Then you'll have your answer.

  • I have a "company provided Ipad" now using IOS 6.1.3.  the company Will allow me to upgrade to IOS 7 but not to IOS 8.  Is that possible?

    I have a "company provided Ipad" now using IOS 6.1.3.  the company Will allow me to upgrade to IOS 7 but not to IOS 8.  Is that possible?

    No, since the iPad 2 is iOS 8 compatible it can only be updated to iOS 8.  Apple does not support upgrading to interim iOS versions, and removes those files from the servers when a new version is released.  The only path for that iPad 2 is iOS 8.0.2.

  • I have an iPod classic that syncs my entire library, I'd like to buy a smaller iPod, a nano maybe for the gym. Can I use the same library or do I need to set up a new library for the 2nd iPod? Is that possible? I mean for one to have 2 iTune librarys?

    I have an iPod classic that syncs my entire library, I'd like to buy a smaller iPod, maybe a Nano for the gym. Would I need a 2nd iTunes library? Is that possibly, I mean for one person to have 2 iTune librarys/accounts?

    Woodblock 3 wrote:
    Would I need a 2nd iTunes library? Is that possibly, I mean for one person to have 2 iTune librarys/accounts?
    In other words, no. You don't need another iTunes Library for your new iPod
    Another iTunes Library, that's only if someone elses music is mixed in with yours and you want to create another Windows user account with their music in it.
    The iTunes Library is the master vault containing all your content, from there you create playlists or smart playlists specially tailored for the smaller iPod's storage requirements.
    For instance if the iPod can hold only 2,000 songs, then you create a smart playlist based upon those rules/limitation. Plus what type of music you like.
    You have a incredible degree of control with smart playlists, they update automatically so you only set the conditions for what goes into them. Including content from other created playlists and smart playlists.
    Then, when you hook up the smaller iPod, it has it's own sync options, "all of your music and playlists" or "only select playlists"  So you use the second option to select just the smart playlist you tailored for the new iPod.
    When you hook up the iPod Classic, only it's sync options are used, not the new iPod ones.
    I hope I explained it better this time.

  • HT5570 My six-year old grandson appears to be able to make purchases on the TV without having to enter the password and yet every other device i use (e.g. iPad, iPhone, iPod) is password protected. How is that possible?

    My six-year old grandson appears to be able to make purchases on the TV without having to enter the password and yet every other device i use (e.g. iPad, iPhone, iPod) is password protected. How is that possible when I have to use my password to access such services on all other devices?

    DominicDeBurca wrote:
    My six-year old grandson appears to be able to make purchases on the TV without having to enter the password and yet every other device i use (e.g. iPad, iPhone, iPod) is password protected. How is that possible when I have to use my password to access such services on all other devices?
    Having AppleTV remember the password is optional.
    Logout of iTunes store, log back in and hopefully next time you come to purchase you'll be prompted for your password but decline the option to remember it.  You might also want to look out of parental controls on the unit.
    AC

  • I was using an apple id, but now I wanna use a new apple id and keep all the data which i stored in the old one. Is that possible to do that?

    I was used one apple id for 2 phones.
    But now, I would like to use a new apple id but store back the old data from the old apple id.
    Is that possible to do that?

    No it is not. Purchases are forever tied to the Apple ID that they were purchased with.
    However, if you want to change your Apple ID, and it is not an @me.com, @mac.com, or @iCloud.com email address, you can log on to Manage your Apple ID with your current ID and password, then click on the EDIT button next to the Apple ID. You can change it to any valid email address that is not an Apple domain email address (the @me, @mac, @icloud mentioned above):
    Apple - My Apple ID
    Cheers,
    GB

  • I want to use 2 ipad 2 devices to present in a one-on-one situation.  I would hand an ipad 2 to my customer and go through a presentation controlling what he/she sees with my ipad 2.  Is that possible?

    I want to use 2 ipads 2 devices as presentation tools in a one-on-one siuation.  I want to cotrol what my customer sees on his/her ipad2 (that I would hand to  him/her) through the ipad 2 that I would be using.  Is that possible?

    This IS possible. Take a look at Fuze Meeting HD and Mobile Presenter Pro on the App Store. Fuze Meeting HD was featured in an iPad commercial, in fact.
    http://itunes.apple.com/us/app/mobile-presenter-pro-wireless/id363283163?mt=8
    http://itunes.apple.com/us/app/fuze-meeting-hd/id389446884?mt=8

Maybe you are looking for

  • Firefox 3.6.8 is not connecting to internet on my windows xp desktop. It is happening with all the later versions after 3.6 release.

    firefox 3.6 is connecting to internet . If it updates to later versions , stopped connecting to internet. I tried with 3.6.8 and 3.6.9 versions.

  • Font too small on Macbook Pro 15" Hi Res

    Hi, I was recently given a new Macbook Pro 15" with High Res screen for my birthday. This is my first ever Mac and I'm struggling to read the fonts on the screen! I changed the resolution down to 1440 x 852 but I lose a lot of sharpness. How do incre

  • How compatible is Oracle forms with OCX / ActiveX components

    How compatible is Oracle forms 6.0 with OCX / ActiveX components? IFve got to very nice activeX controls (ctSchedule and ctMday) from DBI-TECH(www.dbi-tech.com) but they donFt work properly within Forms. They work great within VBA (word). Sometimes t

  • Best Practices for File Management

    I just wrote post about how I use Lightroom, Dropbox, and Crashplan to manage my photos.  I'm curious if anyone here has a critique for my approach.  I'm not a "pro" by any measure, so I'm not sure if this is a good approach, or if there are better w

  • Hex equelent of Char?

    Hi Experts, I need some inputs to do SAP upgrade from 4.& to ECC 6.0. Generally the steps involved in the Upgrade project? What is the role of ABAPer in Upgrade project? What us the role og Functional consultant in project? How the configuration kind