Changes to the JDBC standard

How do you go about asking for a change?
I hate the parameter markers ? for setting PreparedStatements. When you use SQL in C you use host variables, we need a better way of tagging a parameter with a name.
Its not very flash having to set 30 parameters by index.

You could write a class that does that yourself.
Take a string like "insert into foo (:id, :name, :address)". Locate all :parameter strings, remember their positions, and build a new string where each :parameter is replaced by "?".
    SuperPreparedStatement stmt = connection.prepare("insert into foo (:id, :name, :address, :id + 7)");
    // For extra credit, allow multiple uses, like :id and :id+7 above
    stmt.setInt("id", 7); // look up the indexes of :id, and call underlyingPreparedStmt.setInt(1, 123) and .setInt(4, 123);Before starting to code, search the web; I wouldn't be surprised if someone hadn't already written that.
Careful about ":something" inside strings: "select 'hello:world' from dual" shouldn't be converted to 'hello:?'.

Similar Messages

  • Does dbcp support oracle's extention to the JDBC standard

    Hi. I am having trouble using method getCursor() in class OracleCallableStatement. We are using Tomcat 4.1X with dbcp and JVM version 1.4.0. The error message is as follows:
    24/Oct/2002 03:56:58:330: Exception: java.lang.ClassCastException: org.apache.commons.dbcp.DelegatingCallableStatement
    java.lang.ClassCastException: org.apache.commons.dbcp.DelegatingCallableStatement
    at org.test.objects.Test.getCursorResult(Test.java:248)
    and the code looks like this:
    CallableStatement cs_l = conn_l.prepareCall("{call My_Pkg.test(?,?)}");
    cs_l.registerOutParameter(2, OracleTypes.CURSOR);
    cs_l.registerOutParameter(1, Types.INTEGER);
    ResultSet resultSet_l = ((OracleCallableStatement)cs_l).getCursor(2);
    Thanks,
    Lily

    Hi. I am having trouble using method getCursor() in class OracleCallableStatement. We are using Tomcat 4.1X with dbcp and JVM version 1.4.0. The error message is as follows:
    24/Oct/2002 03:56:58:330: Exception: java.lang.ClassCastException: org.apache.commons.dbcp.DelegatingCallableStatement
    java.lang.ClassCastException: org.apache.commons.dbcp.DelegatingCallableStatement
    at org.test.objects.Test.getCursorResult(Test.java:248)
    and the code looks like this:
    CallableStatement cs_l = conn_l.prepareCall("{call My_Pkg.test(?,?)}");
    cs_l.registerOutParameter(2, OracleTypes.CURSOR);
    cs_l.registerOutParameter(1, Types.INTEGER);
    ResultSet resultSet_l = ((OracleCallableStatement)cs_l).getCursor(2);
    Thanks,
    LilyHi,
    i suspect that it might has to do with Oracle's syntax for the string object passed to the prepareCall() callable statement
    begin ?:={schema.][package.]function_name[(?,?,...)]; end;
    or
    begin [schema.][package.]procedure_name[(?,?,...)]; end;
    Kuassi

  • How to restrict the user to change ALV layout for Standard Report Output

    Dear All,
    How can i restict the Users to change Output layout of Standard ALV reports,
    kindly suggest to solve the issue.
    Regards,
    Niranjan.G

    Hi NIranjan,
    In the ALV function module , the i_save can have the below paramater values.
    You can add based on your requirement.
    I_SAVE = SPACE Layouts cannot be saved.
    I_SAVE = 'U' Only user-defined layouts can be saved.
    I_SAVE = 'X' Only global layouts can be saved.
    I_SAVE = 'A' Both user-defined and global layouts can be saved.
    Check the Authorization Object - S_ALV_LAYO  in SUIM (Objects by Complex Search)
    Activity -23.
    Edited by: Raj on Jul 13, 2010 3:05 PM

  • Is it possible to change the drafting standard used by Acrobat 9 Pro Extended?

    Hi All,
    I've seen some inconsistent behavior when converting CATIA V5R19 data to 3D PDF, specifically in regards to the appearance of PMI (3D dimensions, text, flag notes, etc)
    It appears that Acrobat / Adobe 3D reviewer show 3D PMI according to ISO standards.(or some variation)
    However, we use a variation on the ANSI standard for our drawings and 3D Models.
    This results in a significantly different appearance, and I'd like to eliminate this issue.
    Please see the attached files to see examples
    Please let me know how I can change the drafting standard which is used by Adobe 3D Reviewer.
    Thanks
    ~Joe

    Hello Joe,
    Could you please sent me your sample file in order to deeply analyse it ?
    You can reach me at
    [email protected]
    Best Regards
    William

  • Changes to the Standard Text Key in a PM order

    Hi all,
    Is there a better way to track changes to the Standard Text Key in a PM order? When I change the Standard Text Key in the Operations tab (t-code IW32) and I access the change log (menu: Extras > Other documents > Changes) I only see that the language key has been changed. I don’t see the actual Standard Text Key value. Any ideas?
    Thanks in advance for your help.
    Adriana

    Hi
    To use standard texts, perform the following six steps:
    Select the maintenance order and access the operation overview screen using Goto -->Operation overview.
    You can enter standard text keys in this screen or in a detail screen for the relevant operation.
    Enter a standard text key in the appropriate field and press ENTER .
    If the text is longer that the short text line available, the field Text is selected for that operation.
    Check the long text and edit it if necessary. To do this, select the operation and choose Operation--> Long text.
    The system branches to the text editor screen. If you also entered a short text for the operation and specified that this should not be overwritten by the standard text, you will see the short text displayed in the first line of the editor. The following lines contain the standard text.
    Check the standard text and change it if necessary.
    Save the final version of the text and return to the previous screen with Goto--> Back.
    Save the maintenance order.
    Standard texts are created for your system by your system administrator using the Customizing function.
    Regards
    Makarand Gurjar

  • Where is the jdbc driver to change it in IAS folders

    Hello ...
    we are developing an application in Jdevelper 10.1.2. When we test the application in the jdeveloper embedded container, a specific query is not returning the correct information from the database. However, if we deploy the application in an IAS 10g instance in the A server, the specific query in the application works correctly. We deploy the same application in another server and the specific query doesn't work correctly... we belive that the reason of this error is the jdbc driver
    The question is: Where is located the oracle jdbc driver in the IAS 10g folders to change the driver.... i try in the jdbc folder from the Home folder but the folders in both servers are equals the applib folder in the instance path are diferent in some jar files but no one of this files are related with jdbc driver

    Hi,
    I don't want to use JDeveloper.
    I want to write a Java program that connects to the database using Jdbc.
    The PATH and CLASSPATH are defined for Java 1.4.
    Here is the current CLASSPATH:
    L:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar;
    L:\oracle\product\10.2.0\db_1\jlib\orai18n.jar;.
    What "import java......." should I code?
    Many thanks.

  • Request For Quotation: Changes to the standard smartform YBUS_MMRFQ

    Hi Friends,
    I need to do changes in standard smart form of "Request For Quotation". Can any body please explain me how to do changes to the standard smart form with examples. This is my first object on smart forms. Please help me out.
    Thanks and regards,
    Linchon.
    Moderator message: these forums are no subsitute for proper training, please search for avaibable information or attend classes.
    Edited by: Thomas Zloch on Feb 27, 2012

    hello,
    I have created new posting period and series for financial year 2011-12.
    In previous year I have created 600 voucher. My issue is that when I am creating new
    voucher, voucher number is showing 601. I want that for new series voucher number should be
    start from 1. but it seems like numbering series doesn't affect the voucher number.
    Because there are no series creation for journal voucher. In this case how can I solve my problem.
    Please help me on this.
    thanks
    Annu

  • Change video audio tracks in the n900 standard pla...

    Anybody knows if It's possible to change into the two audio tracks of a divx video using the standard video player of the n900?
    Solved!
    Go to Solution.

    You'll need to register an account on bugs.maemo.org first, but after that you can search and create bug reports. Give a much information as possible. Remember to log the bug under the right application (in this case, the media player would probably do)
    After that someone will pick it up and you should get some feed back. Other people with the same problem can follow your bug too.. 
    I recently logged a bug about firmware availability in the UK and it has been solved/fixed.. so some bugs do get attention!

  • On opening up toast to burn its telling me that the tv standard is set to ntsc but all of my content is in pal format. how to change the content to ntsc seeing i am using final cut 10.

    on opening up toast to burn its telling me that the tv standard is set to ntsc but all of my content is in pal format. how to change the content to ntsc seeing i am using final cut 10.

    Select the Project in the Browser.  Go to the Info section of the Inspector.  Click the Modify Settings button.  For  Video Properties, change the Format from PAL to NTSC.  Export again, you'll be fine.

  • How to find out the list of DCs changed in the MSS 600 Support PackageXX

    Hi
    We are trying to instal patches from "MSS 600 support package 07" to "MSS 600 support package 17"  at the same time we have 4 custom DCs in place.
    Our custom DCs have dependencies in MSS standard DCs.
    Question is how do we know the list ot DC changed/modified in suport package XX ?
    Is there a description of DCs changed in the support package? Or is there a description on SC level so we could trace it
    GRANT POINTS!!!
    Thanks
    Denis

    Papaden- Please use metadata comparision tool to find the changes in webdynpro DCs.
    http://help.sap.com/saphelp_nw70/helpdata/en/6e/0e184188b4f16fe10000000a1550b0/frameset.htm
    Thanks,
    Raj

  • Error while trying to Upload the modified standard uwl.standard.xml

    Hello Forum,
    I am working on the UWL customization. I have a situation like i have to remove the links that appear in the ViewDetail of any UWL request. When we open any of the request and VIew the details of it we see the links in the right such as:
    You can also:
    Add Memo
    Display Details in SAP Gui
    Attachments Manager
    Create Ad-Hoc Request
    View History
    Now the requirement is to remove the underlined actions. I read from some forum that i have to comment the actions those were defined in the uwl.standard.xml
    I have commented the actions in the uwl.standard.xml and now when i'm trying to upload the file i get the error message saying:
    Wed Sep 10 14:22:10 CDT 2008 : Operation not allowed on standard configuration:uwl.standard
    How do i upload this modified file? Please suggest me.
    Regards,
    Krishna

    Krishna,
    Instead of modifying the UWL configuration file, this is possible by changing some property in the UWL iView itself.
    Open the UWL iView --> Goto property called List of UWL Actions to Be Excluded --> Enter followUp,launchSAPDetails,manageAttachments,uwlTaskWizard,viewHistory and save your changes.
    Regarding your error, what you can do is while upload "use Upload with High priority". If that does not work then backup the standard configuration, delete the changes, clear the UWL cache and then upload your new custom configuration as uwl.standard.
    Chintan

  • How to display success message when data is changed in the custom tab in MM

    Hi,
    I have added a new custom data tab in the MM01/MM02/MM03 transactions. Whenever I do changes to fields in the custom tab in MM02 transaction, and no changes in the standard tabs, I will get a message stating "No Changes Made".
    But if I do changes in the standard tabs, it works as usual with display of message "Changes to particular material has been done.
    Please let me know, if anyone of you know, how to display the success message if the changes to the custom tab is done.
    Thanks in advance,
    sudhanva

    Hi Sudhanva,
    The exit EXIT_SAPLMGMU_0001 is a function exit that you can use for custom validation but not to add custom tab/screen.
    But the message issued by SAP is not related to this Function Exit.
    If you have used a Screen Exit, then there must be some Function Exits also in the same Enhancement using which you can assign the value of custom fields to/from the standard structure. Thus when the value of any custom field is changed the system can understand that the some changes have been changed and will  not issue the message.
    In case you have used a BADI, there can be other methods in the BADi using whcih you can assign the value of custom fields to/from the standard structure. This might also prevent the message from being displayed.
    I could try giving you further details if you can provide the name of the Enhancement/BADi that you used to add the additional tab.
    Hope this helps.
    Regards,
    Abhisek.

  • Do you trust the SAP standard rule set ?

    Hello all,
    I have the impression that, too often, the SAP standard ruleset has been taken for granted : upload, generate and use. Here is a post as to why not to do so. Hopefuly, this will generate a interesting discussion.
    As I have previously stated in other threads, you should be very careful accepting the SAP standard rule set without reviewing it first. Before accepting it, you should ensure that your specific SAP environment has been reflected in the functions. The 2 following questions deal with this topic :
    1. what is your SAP release  ? ---> 46C is different than ECC 6.0 in terms of permissions to be included in the function permission tab. With every SAP release, new authorization objects are linked to SAP standard tcodes. Subsequently some AUTHORITY-CHECK statements have been adapted in the ABAP behind the transaction code. So, other authorizations need to provided from an implementation point of view (PFCG). And thus, from an audit perspective (GRC-CC), other settings are due when filtering users' access rights in search for who can do what in SAP.
    2. what are your customizing settings and master data settings ? --> depending on these answers you will have to (de)activate certain permissions in your functions. Eg. are authorization groups for posting periods, business areas, material types, ... being used ? If this is not required in the SAP system and if activated in SAP GRC function, then you filter down your results too hard, thereby leaving certain users out of the audit report while in reality they can actually execute the corresponding SAP functionality --> risk for false negatives !
    Do not forget that the SAP standard ruleset is only an import of SU24 settings of - probably - a Walldorf system. That's the reason SAP states that the delivered rule set is a starting point. 
    So, the best practice is :
    a. collect SAP specific settings per connector in a separate 'questionnaire' document, preferably structured in a database
    b. reflect these answers per function per connector per action per permission by correctly (de)activating the corresponding permissions for all affected functions
    You can imagine that this is a time-consuming process due to the amount of work and the slow interaction with the Java web-based GRC GUI. Therefore, it is a quite cumbersome and at times error-prone activity ...... That is, in case you would decide to implement your questionnaire answers manually. There are of course software providers on the market that can develop and maintain your functions in an off-line application and generate your rule set so that you can upload it directly in SAP GRC. In this example such software providers are particularly interesting, because your questionnaire answers are structurally stored and reflected in the functions. Any change now or in the future can be mass-reflected in all (hundreds / thousands of) corresponding permissions in the functions. Time-saving and consistent !
    Is this questionnaire really necessary ? Can't I just activate all permissions in every function ? Certainly not, because that would - and here is the main problem - filter too much users out of your audit results because the filter is too stringent. This practice would lead too false negatives, something that auditors do not like.
    Can't I just update all my functions based on my particular SU24 settings ? (by the way, if you don't know what SU24 settings are, than ask your role administrator. He/she should know. ) Yes, if you think they are on target, yes you can by deleting all VIRSA_CC_FUNCPRM entries from the Rules.txt export of the SAP standard rule set, re-upload, go for every function into change mode so that the new permissions are imported based on your SU24 settings. Also, very cumbersome and with the absolute condition that you SU24 are maintained excellent.
    Why is that so important ? Imagine F_BKPF_GSB the auth object to check on auth groups on business areas within accounting documents. Most role administrator will leave this object on Check/Maintain in the SU24 settings. This means that the object will be imported in the role when - for example - FB01 has been added in the menu.  But the role administrator inactivates the object in the role. Still no problem, because user doesn't need it, since auth groups on business areas are not being used. However, having this SU24 will result in an activated F_BKPF_GSB permission in your GRC function. So, SAP GRC will filter down on those users who have F_BKPF_GSB, which will lead to false negatives.
    Haven't you noticed that SAP has deactivated quite a lot of permissions, including F_BKPF_GSB ? Now, you see why. But they go too far at times and even incorrect. Example : go ahead and look deeper into function AP02. There, you will see for FB01 that two permissions have been activated. F_BKPF_BEK and F_BKPF_KOA.  The very basic authorizations needed to be able to post FI document are F_BKPF_BUK and F_BKPF_KOA.  That's F_BKPF_BUK .... not F_BKPF_BEK. They have made a mistake here. F_BKPF_BEK is an optional  auth object (as with F_BKPF_GSB) to check on vendor account auth groups.
    Again, the message is : be very critical when looking at the SAP standard rule set. So, test thoroughly. And if your not sure, leave the job to a specialized firm.
    Success !
    Sam

    Sam and everyone,
    Sam brings up some good points on the delivered ruleset.  Please keep in mind; however, that SAP has always stated that the delivered ruleset is a starting point.  This is brought up in sap note 986996     Best Practice for SAP CC Rules and Risks.  I completely agree with him that no company should just use the supplied rules without doing a full evaluation of their risk and control environment.
    I'll try to address each area that Sam brings up:
    1.  Regarding the issue with differences of auth objects between versions, the SAP delivered rulset is not meant to be version specific.  We therefore provide rules with the lowest common denominator when it comes to auth object settings.
    The rules were created on a 4.6c system, with the exception of transactions that only exist in higher versions.
    The underlying assumption is that we want to ensure the rules do not have any false negatives.  This means that we purposely activate the fewest auth objects required in order to execute the transaction.
    If new or different auth object settings come into play in the higher releases and you feel this results in false positives (conflicts that show that don't really exist), then you can adjust the rules to add these auth objects to the rules.
    Again, our assumption is that the delivered ruleset should err on the side of showing too many conflicts which can be further filtered by the customer, versus excluding users that should be reported.
    2.  For the customizing settings, as per above, we strive to deliver rules that are base level rules that are applicable for everyone.  This is why we deliver only the core auth objects in our rules and not all.  A example is ME21N. 
    If you look at SU24 in an ECC6 system, ME21N has 4 auth objects set as check/maintain.  However, in the rules we only enable one of the object, M_BEST_BSA.  This is to prevent false negatives.
    3.  Sam is absolutely right that the delivered auth object settings for FB01 have a mistake.  The correct auth object should be F_BKPF_BUK and not F_BKPF_BEK.  This was a manual error on my part.  I've added this to a listing to correct in future versions of the rules.
    4.  Since late 2006, 4 updates have been made to the rules to correct known issues as well as expand the ruleset as needed.  See the sap notes below as well as posting Compliance Calibrator - Q2 2008 Rule Update from July 22.
    1083611 Compliance Calibrator Rule Update Q3 2007
    1061380 Compliance Calibrator Rule Update Q2 2006
    1035070 Compliance Calibrator Rule Update Q1 2007
    1173980 Risk Analysis and Remediation Rule Update Q2 2008
    5.  SAP is constantly working to improve our rulesets as we know there are areas where the rules can be improved.  See my earlier post called Request for participants for an Access Control Rule mini-council from January 28, 2008.  A rule mini-council is in place and I welcome anyone who is interested in joining to contact me at the information provided in that post.
    6.  Finally, the document on the BPX location below has a good overview of how companies should review the rules and customize them to their control and risk environment:
    https://www.sdn.sap.com/irj/sdn/bpx-grc                                                                               
    Under Key Topics - Access Control; choose document below:
        o  GRC Access Control - Access Risk Management Guide   (PDF 268 KB) 
    The access risk management guide helps you set up and implement risk    
    identification and remediation with GRC Access Control.

  • Trigger partner determination when ship-to is changed on the sales order

    Hi,
    Here is my scenario...
    I am defaulting my rail carrier partner function based on the ship-to party partner function into the sales order using the standard configuration i.e. by maintaining SH as entry in the "source" field for rail carrier partner function of the sales document partner determination procedure. Every thing is fine until the ship-to party in the order is not changed by the user. when the user changes the ship-to party the carrier is not re-determined (the old rail carrier partner function which defaulted into the order from the old ship-to party record stays in the document). I know standard SAP doesn't re-determine partners. Can anyone came accross this issue?
    I would like to know if there is an user exit that i could use and write a code to trigger parter determination when a ship-to partner is changed in the sales order.
    -Sree.
    Edited by: SREE on Sep 15, 2008 4:40 PM

    Hi,
    Try to use user exit FORM USEREXIT_SAVE_DOCUMENT_PREPARE in program MV45AFZZ.
    Regards,

  • Automatic Price Change at the time of Confirmation of PP order

    Dear Sir,
    When Production Order is being confirmed (T Code COR6), the
    price of the BOM material (Finished Goods with standatd price)is getting
    changed. PR document type FI document is created and UMB key
    is getting the hit with a very minimum amount. (0.01 Indian Rupees) . This is not happening regularly. But suddenly in one confirmation it is happening. The process order are created in
    the system for 1 month say Start Date 01.01.2009 End Date
    31.01.2009
    This is happeing when confirmation is made in first day of next month
    for previous month i.e. for process order of January 2009 (Start
    Date 01.01.2009 End Date 31.01.2009 ) confirmation is made on the
    01.02.2009. Document date is 01.02.2009, posting date is
    31.01.2009.
    The PR (Price Change) docuement is getting generated on 01.02.2009 with posting date on 01.02.2009.
    At the mont end there is no manual Price Change thru MR21 transaction.
    Regards,
    Partha Pratim Bhar

    Hi,
    You need to check that material Standard Cost estimation has run or not for the next period. Normally Standard cost run can be run every period or once in 3 periods or once in a year. Based on this the standard cost estimate will update the material prices in the costing 2 view if any changes in the existing price. May be his could be the reason you may face the problem.
    Regards,
    V. Suresh

Maybe you are looking for

  • MM - PO's account charging

    Good morning MM consultants. I have a SOS query for you It happens that I have a purchase order, created with many positions and charged to an account 'X'. This PO had some invoice receptions registered with trx MIRO in all positions, then, all posit

  • BOM EXPLOSION IN SUBCONTRACTING SCENERIO

    Hi, To all Experts, This is regarding the bom explosion in subcontracting P.O(scenerio).Scenerio prob. is explained as follows - 1) I have an assembly which includes the semifinish & raw materials. 2) By cs11 it explpodes whole BOm 3) When i made P.O

  • Sp_getapplock script not working in SSIS(data tools 2012)

    Hi, I have a SSIS package created in 2012 data tools. I have added sql tasks to create and release the locks. Create the lock script in sql task1: DECLARE @ProcResult int = 0; -- Get an exclusive application lock on the package execution resource, to

  • Plz help me in my code

    Hi all Plz tell me why 2D lines are not drawn here by clicking on "make connection" JButton and then on required JButtons to make connection between them.................................................................................................

  • Edit node name in flex tree

    I want to edit a node in flex tree. Editable property of the tree makes all nodes editable based on "SELECT" action . But now based on my custom selection I want to edit a particular node. I thought of custom item renderer and item editor but that ap