How to create a JDBC datasource thru script/xml?

Hello All,
Is there any way to create a JDBC datasource using some script or xml file that
can be deployed to WLS 7.x?
This feature is required for our J2EE application installation program.
rgds
MS

Hi
See this thread for connecting SQL Server
Re: what is the process to connect to database from webdynpro ?
For Oracle
try
{DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle_server_ip:Oracle port:SID of the Database","user_name","password");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("your query");
}catch(Exception e){
see this thread
Webdynpro and Oracle
Kind Regards
Mukesh

Similar Messages

  • HOW TO CREATE A VARIABLE IN SAP SCRIPT

    HI ALL,
    CAN ANYONE TELL ME HOW TO CREATE A VARIABLE IN SAP SCRIPT.
    THANK YOU,
    BYE
    TAKE CARE.

    Hi Ravi,
    You can use like this
    A text in the editor contains the following DEFINE commands:
    /: DEFINE &mysymbol& = 'xxx xxx xxxxx xxxx'
    &mysymbol&
    /: DEFINE &mysymbol& = 'yyyyy yyy yyyy'
    / &mysymbol&
    The printed text appears

  • Sap script '' how to create table frame in sap script"""

    i have some problem in sap script''  how to create table frame in sap script"""

    Hi,
    you can use BOX command..
    Syntax
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    Effect: draws a box of the specified size at the specified position.
    Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT and FRAME both a measurement and a unit of measurement must be specified. The INTENSITY parameter should be specified as a percentage between 0 and 100.
    1. XPOS, YPOS: Upper left corner of the box, relative to the values of the POSITION command.
    Default: Values specified in the POSITION command.
    The following calculation is performed internally to determine the absolute output position of a box on the page:
    X(abs) = XORIGIN + XPOS
    Y(abs) = YORIGIN + YPOS
    2. WIDTH: Width of the box. Default: WIDTH value of the SIZE command.
    3. HEIGHT: Height of the box. Default: HEIGHT value of the SIZE command.
    4. FRAME: Thickness of frame.
    Default: 0 (no frame).
    5. INTENSITY: Grayscale of box contents as % .
    Default: 100 (full black)
    Measurements: Decimal numbers must be specified as literal values (like ABAP numeric constants) by being enclosed in inverted commas. The period should be used as the decimal point character. See also the examples listed below.
    Units of measurement: The following units of measurement may be used:
    • TW (twip)
    • PT (point)
    • IN (inch)
    • MM (millimeter)
    • CM (centimeter)
    • LN (line)
    • CH (character).
    The following conversion factors apply:
    • 1 TW = 1/20 PT
    • 1 PT = 1/72 IN
    • 1 IN = 2.54 CM
    • 1 CM = 10 MM
    • 1 CH = height of a character relative to the CPI specification in the layout set header
    • 1 LN = height of a line relative to the LPI specification in the layout set header
    /: BOX FRAME 10 TW
    Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
    /: BOX INTENSITY 10
    Fills the window background with shadowing having a gray scale of 10 %.
    /: BOX HEIGHT 0 TW FRAME 10 TW
    Draws a horizontal line across the complete top edge of the window.
    /: BOX WIDTH 0 TW FRAME 10 TW
    Draws a vertical line along the complete height of the left hand edge of the window.
    /: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
    /: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
    check the fallowing link also
    http://help.sap.com/saphelp_40b/helpdata/en/d1/803293454211d189710000e8322d00/content.htm
    Mark the points if u find it useful...
    Regards,
    Omkar.

  • How to Create MultiSheet Excel Report Output in XML Publisher in Oracle R12

    Dear All,
    How to Create MultiSheet Excel Report Output in XML Publisher in Oracle R12.
    My Requirement is to develop RTF Template and geneate Excel output in Multiple sheet.
    plz guide me on this..
    thnx
    Khushal

    plz see
    BI Publisher: How to create Multisheet in Single Excel file using Excel Template [ID 1352000.1]
    for r12 you can use excel template
    i think it more appropriate for excel output

  • How to create 3d photgallery in flex using xml

    How to create 3d photgallery in flex using xml . I am new to flex please help me.Thanks in advance

    How to create 3d photgallery in flex using xml . I am new to flex please help me.Thanks in advance

  • Does anyone here knows how to create a login page thru JDBC?

    Anyone here knows how to create a login page which connect to database thru JDBC but not JDBC-ODBC bridge?

    Hi..pls you'll do people here a great good if you could explain yourself better..!
    Anyway if you are trying to connect to an Oracle Database you dont need the jdbc-odbc bridge as oracle provides a special driver for java applets/applications that is "the thin driver" and the "oci driver"..so if you are connecting to Oracle your connection will look like this:
    Class.forName("oracle.jdbc.driver.OracleDriver"); //not sun.jdbc.odbc.JdbcOdbcDriver
    Connection con = DriverManager.getConnection ("blah blah, blah");
    no need for the jdbc-odbc bridge.
    I hope i've answered your question.
    Thanks.

  • How to create a class using java script..

    Hi all,
    Iam new to java script and I tried out the following program but its not working..I basically created a class just like a java prog' but Iam not getting any output or error.Iam attaching the code below.
    If I created one function inside the script and create one object its working fine but what should I do when I have a lot of function??so I created a class and put all the function and created an object but its not working..
    Do let me know what changes should I do..Iam attaching the code which I had written. or give me an example of how to create a class with couple of functions using JAVASCRIPT
    Thanks
    Avis_su
    <html>
    <head><title>JSP Page</title></head>
    <body>
    <SCRIPT language = "JavaScript">
    <!--
    //Created classes
    class book
    var title: String;
    var author:String;
    function author()
    doucument.write("Author is " +this.author);
    function tile()
    doucument.write("Title is " +this.title);
    function printall()
    var counter = 0;
    function author();
    function title();
    var chapters = Array[String];
    for(chapter in this chapters)
    counter++;
    document.write("Chapter" counter" :"+this.chapters[chapter]+"<br>");
    var thisbook = new book()
    thisbook.author = "Sivagami";
    thisbook.title = "MS in CS giude";
    thisbook.chapters = new Array[10];
    thisbook[0] = "Prepare to Excell in all ";
    thisbook[1] = "Learn to be happy";
    thisbook[2] = "Learn to be healthy mentally emotionally physically";
    thisbook[3] = "Siva and Subbu along with kidssssss will be successful in future";
    thisbook.printall();
    //-->
    </script>
    </body>
    </html>

    Run this program to get your answer:
    public class AnswerToYourPost {
    public static void main(String args[]) {
    System.out.println("TRUE/FALSE: This question
    ion belongs on a Java forum.\n"
    + "ANSWER: " + ("Javascript" == "Java"));
    }Since when do we compare objects for equality using operator == ?

  • How to create a hierarchy datasource in R/3

    Hello,
    We use the 0MATERIAL_LKLS_HIER hierarchy datasource to load material hierachy in BW.
    I had to modify the function module that creates the data for 0MATERIAL_LKLS_HIER.
    Now, i need to create a new datasource based on the new function module.
    To do so, i created a generic datasource (with SBIW), a master data attributes datasource.
    I tried to put the same parameters that in 0MATERIAL_LKLS_HIER, but i didn't find how to indicate that it's a hierarchy and some other parameters (as you can see in RSA2 for 0MATERIAL_LKLS_HIER in the "semantic attributes" area).
    Also, i couldn't run the new datasource in RSA3 because it didn't show me the right selection fields.
    Could you tell me if there is a specific transaction to create hierarchy datasources ?
    Thank you.
    MGH

    Hi,
    May help you:----
    Re: hierchy creation in ECC and replicate to BI
    http://help.sap.com/saphelp_nw04/helpdata/en/8e/dbe92341c84242be2c7d3917f1c197/content.htm
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7034028c-ad1d-2a10-2c94-868e7707dfe2
    Regards,
    Suman
    Edited by: Suman Chakravarthy on Aug 6, 2011 3:12 PM
    Edited by: Jason Lax on Dec 28, 2011 2:28 PM (Updated URL to correct format)

  • How to create table in the sap script

    Hi,
    How to create a table in the  sap script layout, i Have to use table in the main window with  7 columns. can any one send sample code.
    How to calculate the number of line items which are displaying in the main window, if the number of line items are exceed in the main window then the amount has to be calculate and print as "BALANCE FORWARD" and the next page had to be displayed as "CARRY FORWARD" that amount. if this is the last page not subsequent page the amount had to be calculated the carry forward amount and total amount and print as "TOTAL AMOUNT". i am creating the new layout and the program is the standrad driver program i have to use and i have to use the standard Text elements only, can any one help me on this issue

    hi
    good
    there is no "pattern" option in SAPscript. All you have at your disposal are the following SAPscript commands: BOX, POSITION and SIZE. Not only are these commands both confusing and tedious to implement, they also are limited in what they can achieve. For instance, although you can suppress a box during printout (by making it conditional), there is no simple way to adjust it dynamically instead. Thus, to divide sequential line items, you may wish to use an underline (ULINE) or simply white space.
    thanks
    mrutyun

  • How can create a table in sap script?

    Hi,
    How to create a table in the sap script.i Have to use table in the main window with 11  rows and 3 columns. can any one send sample code. Any ideas?¿
    THKS 4all.

    Try and check on the below logic....
    1. write -
    2. write headings with '|' at start and end as well as the field separator.
    3. write -
    4. similar to step two write the data with pipe separators.
    5. write -
    regards
    Anurag

  • How to create a hierarchy datasource in BW

    Gurus-
    Here is my requirement.
    I am asked to create a DSO and equivalent datasource for profit center. How to create a datasource for profit center in BW?

    what does ur DSO has to do with the hierarchy? And subject line and the subject are misleading.
    these are some of the std PCA datasources:
    0PROFIT_CTR_0106_HIER       
    0PROFIT_CTR_ATTR                 
    0PROFIT_CTR_TEXT
    0EC_PCA_1                         Profit Center: Transaction Data on Accounts
    0EC_PCA_2                         Profit Center: Statistical key figures
    0EC_PCA_3                         Profit Center: Actual Line Items
    0EC_PCA_4                         Profit Center: Actual Line Items Periodic Transfer

  • How to create and upload logo into script

    hi guys,
                can you help me how to create logo and upload the logo into sap script please...

    Hi
    Welcome to SDN forum
         SAP SCRIPT
    To create a logo in SAP printouts just do the following
    1. Save a Logo using Imaging, Paint shop Pro or Corel Draw as Tiff file.
    2. Run  program RSTXLDMC and enter the following parameters
       Enter file name                     C:\COMPLOGO.TIF
       UOM                           CM
        Line width for text                132
        Text name                     ZHEX-MACRO-COMPLOGO
        Text ID                          ST
        Text language = E
        Number of Tiff gray levels (2,4,9) 2
    3.  Then Create a new window 'COMP' with attributes;
    Window COMP description Company Logo
    Left margin 7.00 CH window width 10.00 CH
    Upper margin LN window height 8.00 LN
    Finally in the text element, mention
            /: INCLUDE 'ZHEX-MACRO-COMPLOGO' OBJECT TEXT ID ST LANGUAGE 'E'.
    Please note that if object name is not indicated as 'ZHEX...’ the logo may not be printed!
    You will not be able to see the logo in a test print. The same will be printed in actual printout.
                          SMARTFORM
    1)     In Smart Forms Editor, In left pane, right Click any Page (say Page1) and select Create -> Window, Give it a name and Description (Say Window1)
    2) Right Click on Window (Window 1) and select Create -> Graphics, Give it a name and description
    3) In general Attributes, Select Name, get search help (F4) , you will find a list of pictures
    4) Select any picture and set its Resolution in DPI
    5) Press F9 to open Smart Forms Builder, Select window (Window1) and In Output options window set, size and   position of the Logo
    6) Set any other parameters if required, save and activate.
    7) If there is only 1 Window in the forms, set it as Main Window in general attributes.
    8) Use  TCode SE78 to upload new pictures and logos.
    look at Thread Dynamic Graph in smartforms
    Refer the links also -
    Re: Dinamic Graph in smartforms
    How to get file perperties in Unix server
    regards
    Anji

  • How to undeploy JNDI JDBC datasources?

    We have created JDBC DataSource in production server, and deleted as we were not able to start those JDBC oracle DataSource. but this DataSource are still there in JNDI registry.
    Is there way to undeploy JNDI JDBC datasources?
    Thanks,
    Nitesh Shelar.

    Closing....
    Solution Found None

  • How to create a hypertext in SAP script

    Hi All,
    I want to create a hypertext in SAP script.I read 'Creating hypertext in SAP script' posted on www.sdn.sap.com, but I am not able to get desired output.Kindly suggest the soloution.
    Regards,
    Pranjali Silimkar

    Hi,
    I read the document 'Creating hypertext in SAP script' posted on the link 'http://wiki.sdn.sap.com/wiki/display/ABAP/CreatingHypertextinSAPScripts', but I am not able to get the desired output.It is displaying the same text again on the same page which is not the desired output.Kindly suggest me some solution.
    Regards,
    Pranjali Silimkar

  • How to creat an internal datasource

    Hi experts,
    I'm trying to creat a internal datasource to pick up data from the USR02 table to a n infocube (tcode rsds).
    Text error : "Creation of DataSources for SAP source system FBWCLNT010 is not permitted"
    Help : "You cannot directly create DataSources for replicating source systems in BI.
    The system terminates the process."
    Can you help me please ?
    Best Regards,
    Pierre.

    I GUESS THIS IS NOT THE RIGHT FORUM TO ASK THIS QUESTION.
    You can post your Questuion in BI/BW forum

Maybe you are looking for

  • Transferri​ng shows from DVR to DVR

    I just got FiosTv and the box we received doesn't work. However, it worked long enough for me to program it to tape all of my shows for a week, and it appears to have taped all of them. But now we have to get a new box and I will lose all of my shows

  • Em not working.......

    hi all. my EM is not workng.when i try to start it by using command emctl start dbconsole,it gives following error "The OracleDBConsoleoracle service could not be started.". can anybody provide me the complete solution regarding my problem. thanx in

  • Coverflow problem with iPhone

    I have several problems with the coverflow feature in my iphone: 1) Some covers does not appear even they are in itunes 2) Covers are scrambled .. does not corresponde to the actual album .. and they are correct in itunes 3) In coverflow .. the artwo

  • Home Button Plays Music From Sleep, Instead Of, Well, Doing Nada!

    Pretty much as the subject states Ipod touch 64Gb - when you press the home button (from sleep), rather than have the wallpaper and slide to unlock, you instead get album art and slide to unlock and the tune kicks in! Restoring it to a "new" ipod wit

  • What is "swat" where can i find more info.

    Hi everyone, I hope this is the appropriate forum to post this, I need to find out about swat.ReturnCode and swat.cwa and the whole API. Any hint or resources would be very much appriciated. Thanks inadvance