JDBC and SQLJ

Can I use SQLJ inside my servlets? Or, do I have to create stored procedures with SQLJ and connect to those through JDBC in my servlets? If I use SQLJ as stored procedures, how do I retrieve the information from the SQL calls from my servlet?
Thanks

Hi jmennen,
Yes, your servlets can use SQLJ, provided they have access to the appropriate SQLJ classes.
However, your question gives me the impression that you are very confused regarding SQLJ and/or JDBC.
I suggest you state what you want your servlet to do, and thus allow people to suggest the best way to implement your servlet.
[You may not even [i]need SQLJ (or JDBC) :-]
Hope this helps.
Good Luck,
Avi.

Similar Messages

  • Difference Between JDBC and SQLJ

    Can any one explain the difference in using JDBC and SQLJ with example codes_...

    Oracle documentation can
    http://download.oracle.com/docs/cd/B19306_01/java.102/b16018/overview.htm#i1006033

  • Diff between jdbc and sqlj

    hi friends
    could u all pls try and explain me as to what is the diff between sqlj and jdbc.
    are they same or different.
    reg
    prem

    SQLJ let you embed SQL statements directly in the Java code - this is being converted into JDBC calls in pre-compile time.
    Think of SQLJ as an abstraction layer on top of JDBC that let you work with SQL.

  • WHICH IS BETTER JDBC OR SQLJ

    HI
    CAN SOMEBODY EXPLAIN TO ME THE DIFFERENCES BETWEEN JDBC AND SQLJ AND WHICH IS BETTER???
    THANK YOU

    Well, SQLJ has been desupported in 10g, so I would strongly hesitate to do new development there.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • What is faster JDBC or SQLJ ?

    hi
    i am writing a java stored procedure in db2.
    i have to process nearly a million reocrds. For ech record i have to do atleast 15 inserts/updates to the database.
    what would be better to use JDBC or SQLJ(static sql) in terns of speed

    hi
    i am writing a java stored procedure in db2.
    i have to process nearly a million reocrds. For ech
    record i have to do atleast 15 inserts/updates to the
    database.
    what would be better to use JDBC or SQLJ(static sql)
    in terns of speedLike all good performance questions... it depends. If I were going to process 1 million records and do 15 million insert/updates with the results, I would look first at using the database vendors native utilities. It may be faster to read the million records with Java and write 15 million records into a flat file in the format expected by a native load utility. Then use the native load utility to do the insert/ updates. These load utilities can be 100's of times faster than anything that can be written in Java at this time.
    If you are set on using Java, then... it depends. When using JDBC you should use Batch update functionality, this can speed up insert/update activity by 10x+, if you do it correctly (making sure that you select the appropriate batch size). Prepared Statements provide the least external overhead because the database engine only needs to parse the SQL statement a single time. However you are providing less information to the database optimizer and this could result in worse performance for update processing. Insert activity will not be negatively, and should be positively effected by using a prepared statement because there is no query logic. I haven't written a Java DB2 stored procedure, but I am assuming that you have normal JDBC functionalty available to you.
    I'm not sure exactly what SQLJ does for you. It sounds like it is similar to a Prepared Statement (static vs. dynamic SQL). Perhaps others who have used SQLJ can add some of their knowledge.
    Once again, I would highly recommend looking at alternative utility processing as your first choice, some form of hybrid Java Stored procedure with a load Utility as a second choice and Java stored procedure only, as your last choice. Remember that volumes tend to increase so if this is an on going process you want to allow for 2 or 3 million records for the future.
    Joel

  • Connection from jdbc or sqlj using operating system authentication

    Is it possible to use the operating system authentication to connect to oracle which is on the same box from jdbc or sqlj??
    Any help is appreciated

    You can logon using external credentials with the oci driver by passing in null's as username and password.

  • JDBC or SQLJ

    Hi guys,
    Can someone please tell me which one should I use, JDBC or SQLJ when writing the programs that connect to the database and do inserts/updates/deletes and retrive rows from the database based on SQL queries. Please state what would be plus point of choosing one over the other. I vaguley remember reading somewhere that SQLJ is better when the application that uses it, is going to issue mostly static queries to the database. However, if the application is going to use dynamic queries, then JDBC is better. Is this correct?
    Are there any other reasons? Also, in the same program both can be used simultaneously, correct? Thank you!

    I did check out SQLJ simply out of curiosity, but I don't think SQLJ has any practical use for enterprise software (well, that is what I do and I will speak from that point of view).
    Think about this. When you develop a software application, you want to minimize the chance of going back to fix anything, and recompile and redeploy as much as humanly possible. If your SQL statements are embedded inside the application's code, you increase the chance to have to make changes.
    JDBC is a better route. There are two ways to do that:
    1. Do a simple client-server set up. Put all your SQL queries and data manipulation on the stored procedures. Stored procedures are precompiled and run on the server, therefore increase performance (it has to be faster than SQLJ). All you have to do is to call these stored procedures from your Java code with whatever parameters that you have to pass.
    2. If you want to do it right, multi-tiers is the way to go IMHO. Put all the select/update/insert simple SQL statements in the stored procedures. But maintain the business logics, business rules, and calculation in the middle tier.
    As I have said, I develop enterprise software that processes millions of records in short period of time. It might be different in other situation. But I still think that JDBC is better than SQLJ for practical application.
    Just my $0.02.

  • Help on RFC to JDBC and JDBC to RFC

    Help on RFC to JDBC and JDBC to RFC
    Hi Gurus
    I have the scenario where an RFC will be triggered in SAP , to write to a DB2 database and insert new records in a table
    and vice versa the JDBC has to read som data from a table based on a primary key, mark them as read for not be read next time and send the data to an RFC where a table in SAP will be updated.
    I have never worked with JDBC before , pls advice.
    is there any new issue to consider in PI 7.0 regarding JDBC
    Thanks.

    The requirement looks standard,
    SEARCH IN SDN FOR JDBC scenarios,you will find many docs for sender as well as Receiver.
    >
    > is there any new issue to consider in PI 7.0 regarding JDBC
    >
    no issue with PI7.0.
    Regards,
    Raj

  • IDoc to JDBC  and JDBC to IDoc Scenario

    Dear All,
    I am working on IDoc to JDBC and JDBC to IDoc Scenario.
    I have to send Idoc from SAP to Non SAP system(.NET application) i almost configured in XI but still i don't know when my INTEGRATION will INVOKE how my data will proceed from IDOC to Oracle database(Through JDBC) and in case of revese how and when Data flow will start.
    Does anyone have completed STEP by STEP scenario document for this?
    How my Idoc will sent to XI?
    How XI will pick up data from IDoc?
    How XI will Convert data to JDBC and UPDATE in Oracle Database?
    And i reverse case(JDBC to IDoc) when my INTEGRATION will INVOKE?
    Where and When i can watch my process and data?
    How can i test the whole integration?
    I AM GETTING ERROR WHILE TESTING CONFIGURATION IN Integration Directory "Error while refreshing the XI runtime cache" and when i check this in SXI_CACHE  it gives me error
    "Unable to refresh cache "NO_BUSINESS_SYSTEM"
    "Error during last refresh to cache"LCR_GET_OWN_BUSINESS_SYSTEM - NO_BUSINESS_SYSTEM"
    Please solve all the above problems i will reward u points
    thanks,
    RP

    Hi,
    While we working on IDOC to JDBC interface..
    We have to deploy JDBC Drivers?
    Go through this links,
    /people/varadharajan.krishnasamy/blog/2007/02/27/configuring-jdbc-connector-service-to-perform-database-lookups
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci1246926,00.html
    To install JDBC driver follow the how to guide.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how%20to%20install%20and%20configure%20external%20drivers%20for%20jdbc%20and%20jms%20adapters.pdf
    Configuration of JDBC Adapter for SQL Server
    JDBC Driver = com.microsoft.jdbc.sqlserver.SQLServerDriver
    Connection = jdbc:microsoft:sqlserver://hostname:<port>;DatabaseName=<DBName>
    UserID and Password.
    If the connection is not working find the correct port number.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40b92770-db81-2a10-8e91-f747188d8033
    JDBC- X I -  R/3 Scenario
    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    Please check the driver path as mentioned below.
    JDBC Driver : sun.jdbc.odbc.JdbcOdbcDriver
    Connection:jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=//location of DB table.mdb;
    No JDBC driver required.
    Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    follow this thread
    Re: Problem when connecting to MS Access through JDBC Adapter.
    SAP Note 850116 has details
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    Configuring the Sender JDBC Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/content.htm
    Configuring the Receiver JDBC Adapter
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm
    Idoc Reveiver adapter..
    http://help.sap.com/saphelp_erp2004/helpdata/en/b9/c5b13bbeb0cb37e10000000a11402f/content.htm
    Thanks,
    Satya Kumar
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    Edited by: SATYA KUMAR AKKARABOYANA on May 8, 2008 5:51 PM

  • Content Conversion - JDBC and JMS

    Can we use File Content Conversion with JDBC and JMS ?

    Hi,
    How To Use the Content Conversion Module in JMS Adapter - https://websmp106.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000582377&
    check this for JMS content conversion:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
    Check the how to guide provided by prabhu and also this link on the XMl To TeXtCoversion Module,
    http://help.sap.com/saphelp_nw04/helpdata/en/44/748d595dab6fb5e10000000a155369/content.htm
    Ref How To Use the Content Conversion Module in JMS Adapter -
    https://websmp106.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000582377&
    See this weblogs which was shown with examples:
    How to use SAP's WebAS J2EE's JMS Queue in Exchange Infrastructure
    Sync/Async communication in JMS adapter without BPM (SP19)
    Async/Sync Communication using JMS adapter without BPM (SP 19)
    Exploring JMS and SAP-XI JMS Adaper
    Configuring the sender JMS adapter
    http://help.sap.com/saphelp_nw2004s/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/content.htm
    Configuring the receiver JMS adapter
    http://help.sap.com/saphelp_nw2004s/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/content.htm
    Check JMS Adapter section of this blog by Sravya:
    Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part III
    Also information related to Provider-specific settings are available
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cd/d85a9d6fab7d4dbb7ae421f710626c/frameset.htm
    Plz do refer the following threads:
    JMS Content Conversion - no CR/LF
    Message (Data) getting lost after JMS Content Conversion(Sender)
    Message (Data) getting lost after JMS Content Conversion(Sender)
    Message (Data) getting lost after JMS Content Conversion(Sender)
    Regards,
    Vinod.

  • JDBC and FTP sender channels stop polling

    Hi,
    We have a great volume of sender JDBC and FTP sender channels.
    For this reason there is nothing unusual to have temporary error connections.
    Several months ago, with an XI 3.0 system, sender channels recover its functionality  automatically when temporary error connection is solved.
    But now, he have migrate to a  PI 7.1 sytem, and in the same scenario and configuration,  sender channel stop polling after a temporary error . In cc monitor this channels remains in  green status and there were no signs of stopped interfaces.
    Timeouts are correctly defined and there is no difference between channel configuration in our Xi and PI system.
    How to solve this problem?
    Thanks, in advance.
    Carme.

    Thanks for your fast response, Stefan.
    After writing this post, i ask the same question to our basis team and  we are in the latest sp.
    ¿do you know if there is any note or can you provide me some additional information?
    I'm not able to find any note about this issue...
    Regards,
    Carme.

  • Adapter Limitations Of Sender  JDBC and Mail Adapter

    hi All,
    could you tell me the limitations of JDBC and Mail Adapter .i need to document these details .
    Regards
    Vidya Sagar

    HI Vidya,
    If i was you, i would do a list of things that i would need about these adapters, o i would search the SAP.help documentation for a first view and later ask about this possibility. Another way is to read the SCN doubts about these adapters and you can find some problems. You should think about the PI version as well.
    Regards.

  • JDBC and Linguistic Sorting

    The problem: oracle jdbc thin driver doesn't see environment variable NLS_SORT
    Description:
    We have a lot of code written in coldfusion and now we would like to switch form CF5 to CFMX. We use oracle thin driver to connect CFMX to oracle DB.
    The problem is that "order by" doesn't work as earlier. It seems that it jdbc driver couldn't make linguistic sorting, only binary. I tried with different versions, classes12.jar and ojdbc14.jar (the newest from otn).
    I know that i could solve problem if use sql function nlssort but it is not acceptable for us. We couldn't change all our source code. We would like to use env variable NLS_SORT to control this behaviour.
    I also wrote small standalone java program to test this directly but it doesn't see NLS_SORT. sqlplus from same shell works well.
    Is it possible to set oracle jdbc thin driver to use NLS env settings (NLS_SORT)?
    If yes, how? If not, what is the way to do linguistic sorting using jdbc?
    Thank you,
    Zeljko

    Zeljko,
    I don't have an answer for you (sorry), but I can suggest some resources where you may find the answer (hopefully -- assuming you haven't already tried them).
    The section entitled JDBC and Globalization Support in chapter 18 ("Advanced Topics") of the "Oracle9i JDBC Developer's Guide and Reference, Release 2 (9.2)".
    [Note: Since I couldn't see any details in your post about which Oracle version you are using, I assumed it was 9.2. However, you can access Oracle documentation for all the latest versions from the [url=http://tahiti.oracle.com]Tahiti Web site.]
    The Globalization Development Kit may be helpful.
    The Java Developer Center
    The Oracle JDBC FAQ
    Good Luck,
    Avi.

  • How to make JDBC and SAP connectivity with VC 6.0

    can anyone help me.....how to make JDBC system and SAP system visible in the System drop-down list in Data Task Panel of Visual Composer 6......i mean how to make connectivity with JDBC and SAP system......so that i can use any table in the back-end database as well as any BAPI in the R/3 system.........
    Thank you very much.....

    Hi Deep,
    There is a how-to posted on SDN regarding how to connect and configure the BI JDBC Connector.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/6209b52e-0401-0010-6a9f-d40ec3a09424
    This document describes the jdbc driver to use etc.
    Hope this helps,
    Cheers,
    Scott

  • Which tutorials may you suggest for JDBC and servlets?

    Hello, i would to learn about JDBC and servlets.
    May you please suggest me a good tutorial(e.g.post me a link) in order to study for JDBC and servlets?
    e.g. How to make a servlet etc.
    Thanks, in advance!

    I agree with PhHein, it's best to learn one technology and then the other. (Just my two cents, but start with JDBC from a simple standalone application, then when that is working, try to tackle Servlets, since you will need to also learn how to get them working in a container like Tomcat).
    Here is a tutorial that has both concepts in it at the same time. Site is down now, but is usually up. http://www.roseindia.net/jdbc/jdbcconnectivity.shtml
    Also, you will eventually want to download a J2EE container such as Tomcat or Jboss.
    - Saish

Maybe you are looking for

  • Can't use Canon iR C4580i to print after upgrading to Mavericks

    Can anyone help to solve the problem? I have tried to download the driver version 10.2.0 but still cannot use canon iR C4580i to print. Thanks

  • Service on 4th Gen 40GB iPod

    I have a 4th generation 40GB iPod that is still covered by AppleCare and going to require service. I've restored my iPod, removed and reinstalled iTunes and nothing has fixed it. Initially, it was freezing mid-song and skipping 2 or 3 songs ahead bef

  • PR Line Item Number should be Same for PO Line Item Numebr

    Hi Gurus, I have a rare Requiremenet. I will convert Only one PR to PO(So It is one to one) PR Item Number should Be Equal to PO Item Number.. can anybody suggest me is there any way to achive this. Explanation: Actually we will create third party Sa

  • Picking file with different names

    Hi Experts,     I am doing file to file scenario without IR.I am just picking up the files from sap appl server  and placing in third party server. my question is i having ten files different names.so i haev to pick up all the files.i can not put the

  • BSP close a page

    Hello, I'm new at BSP programming and I'm quite lost... I have a BSP created without controllers, and I want to create a button which should close a page. In the <u>layout</u> I have written: <htmlb:button id     = "close"                     text